Skip to content

Commit

Permalink
fix(keymaps): better j/k for visual mode (#902)
Browse files Browse the repository at this point in the history
  • Loading branch information
uyha committed Jun 8, 2023
1 parent 7c593dc commit e049928
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/lazyvim/config/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ local function map(mode, lhs, rhs, opts)
end

-- better up/down
map("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
map("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
map({ "n", "v" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
map({ "n", "v" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })

-- Move to window using the <ctrl> hjkl keys
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window", remap = true })
Expand Down

0 comments on commit e049928

Please sign in to comment.