keybind: allow moving cursor through wrapped lines
This commit is contained in:
parent
f99a90f53f
commit
bfe5cdd607
|
|
@ -10,6 +10,13 @@ M.general = {
|
|||
["<C-j>"] = { "<C-w>j", "window down" },
|
||||
["<C-k>"] = { "<C-w>k", "window up" },
|
||||
|
||||
-- Allow moving the cursor through wrapped lines with j, k, <Up> and <Down>
|
||||
-- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/
|
||||
-- empty mode is same as using <cmd> :map
|
||||
-- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour
|
||||
["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } },
|
||||
["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } },
|
||||
|
||||
-- new buffer
|
||||
["<leader>b"] = { "<cmd> enew <CR>", "new buffer" },
|
||||
|
||||
|
|
|
|||
Reference in New Issue