Skip to content

Commit

Permalink
Use C-k, C-j as default keybindings
Browse files Browse the repository at this point in the history
  • Loading branch information
sireliah committed Nov 20, 2022
1 parent f4435f0 commit 3bffecf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions helix-term/src/keymap/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ pub fn default() -> HashMap<Mode, Keymap> {

"C-a" => increment,
"C-x" => decrement,
"C-up" => move_selection_above,
"C-down" => move_selection_below,
"C-k" => move_selection_above,
"C-j" => move_selection_below,
});
let mut select = normal.clone();
select.merge_nodes(keymap!({ "Select mode"
Expand Down
14 changes: 7 additions & 7 deletions helix-term/tests/test/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ async fn test_move_selection_single_selection_up() -> anyhow::Result<()> {
dddddd
"})
.as_str(),
"<C-up>",
"<C-k>",
platform_line(indoc! {"
aaaaaa
cc#[|c]#ccc
Expand All @@ -320,7 +320,7 @@ async fn test_move_selection_single_selection_down() -> anyhow::Result<()> {
dddddd
"})
.as_str(),
"<C-down>",
"<C-j>",
platform_line(indoc! {"
bbbbbb
aa#[|a]#aaa
Expand All @@ -344,7 +344,7 @@ async fn test_move_selection_single_selection_top_up() -> anyhow::Result<()> {
cccccc
dddddd"})
.as_str(),
"<C-up>",
"<C-k>",
platform_line(indoc! {"
aa#[|a]#aaa
bbbbbb
Expand All @@ -364,7 +364,7 @@ async fn test_move_selection_single_selection_bottom_down() -> anyhow::Result<()
// linebreak, making it impossible to test
test((
"aaaaaa\nbbbbbb\ncccccc\ndd#[|d]#ddd",
"<C-down><C-down>",
"<C-j><C-j>",
"aaaaaa\nbbbbbb\ncccccc\ndd#[|d]#ddd",
))
.await?;
Expand All @@ -383,7 +383,7 @@ async fn test_move_selection_block_up() -> anyhow::Result<()> {
eeeeee
"})
.as_str(),
"<C-up>",
"<C-k>",
platform_line(indoc! {"
bb#[bbbb
ccc|]#ccc
Expand All @@ -409,7 +409,7 @@ async fn test_move_selection_block_down() -> anyhow::Result<()> {
eeeeee
"})
.as_str(),
"<C-down>",
"<C-j>",
platform_line(indoc! {"
dddddd
#[|aaaaaa
Expand All @@ -435,7 +435,7 @@ async fn test_move_two_cursors_down() -> anyhow::Result<()> {
eeeeee
"})
.as_str(),
"<C-down>",
"<C-j>",
platform_line(indoc! {"
aaaaaa
cccccc
Expand Down

0 comments on commit 3bffecf

Please # to comment.