Skip to content

Commit 3a000d7

Browse files
committed
feat(keymaps): update navigation keybindings
- Updated keybindings for navigating cursor positions. - Changed key mappings for older and newer cursor positions. - Clarified documentation for keybindings in the readme. - Improved consistency in keybinding descriptions.
1 parent 219fca6 commit 3a000d7

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

lazy-lock.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"mini.pairs": { "branch": "main", "commit": "42407ccb80ec59c84e7c91d815f42ed90a8cc093" },
2020
"mini.surround": { "branch": "main", "commit": "f59022c2c66c1cffd3cd755b105faa468b25a4e0" },
2121
"nvim-dap": { "branch": "master", "commit": "5dd4d50f2e6a2eaf9e57fad023d294ef371bda35" },
22-
"nvim-dap-view": { "branch": "main", "commit": "280213aa7a553c03fccf97771e340f991706478c" },
22+
"nvim-dap-view": { "branch": "main", "commit": "fa6631a86059936c16e6e5ca36025426710dd94a" },
2323
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
2424
"nvim-treesitter-refactor": { "branch": "master", "commit": "d8b74fa87afc6a1e97b18da23e762efb032dc270" },
2525
"nvim-treesitter-textobjects": { "branch": "master", "commit": "89ebe73cd2836db80a22d9748999ace0241917a5" },
@@ -30,7 +30,7 @@
3030
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
3131
"rustaceanvim": { "branch": "master", "commit": "66398662c07d265b226897500ed50eafba3dffb4" },
3232
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
33-
"timber.nvim": { "branch": "main", "commit": "73efb34816264695bfe242281cce3baf2c7dd895" },
33+
"timber.nvim": { "branch": "main", "commit": "d32f10e30c1056861c412a00a028869538998e30" },
3434
"treewalker.nvim": { "branch": "main", "commit": "ae229700e1cce34198280f588568dc49c52d9eb1" },
3535
"ts-comments.nvim": { "branch": "main", "commit": "1bd9d0ba1d8b336c3db50692ffd0955fe1bb9f0c" },
3636
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },

plugin/keymaps/normal.lua

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ k("j", function()
2121
return vim.v.count > 0 and "m'" .. vim.v.count .. "j" or "gj"
2222
end, { expr = true })
2323

24-
-- <c-i> would trigger the toggle fold because it's the same as <tab> `:h CTRL-I`
25-
-- ' as in jump to mark and ;, as used in the changelist (g;, g,). `h g;`
26-
k("';", "<c-o>", { desc = "Older cursor position" })
27-
k("',", "<c-i>", { desc = "Newer cursor position" })
24+
-- <c-i> would trigger the toggle fold because it's the same as <tab>
25+
k("[;", "<c-o>", { desc = "Older cursor position" }) -- `:h ctrl-o`
26+
k("];", "<c-i>", { desc = "Newer cursor position" }) -- `:h ctrl-i`
2827

2928
-- Jump to mark `:h map-backtick`
3029
k("'", "`", { desc = "Jump to mark cursor" })
@@ -75,8 +74,8 @@ k("<leader>yf", function()
7574
end, { desc = "Copy relative file path" })
7675

7776
-- http://www.kevinli.co/posts/2017-01-19-multiple-cursors-in-500-bytes-of-vimscript/
78-
k("cn", "*``cgn", { desc = "Change word (forward)" })
79-
k("cN", "*``cgN", { desc = "Change word (backward)" })
77+
k("cn", "*``cgn", { desc = "Change word (forward)" }) -- `:h gn`
78+
k("cN", "*``cgN", { desc = "Change word (backward)" }) -- `:h gN`
8079

8180
-- }}}
8281

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ Random features added.
181181
- `<leader>/` find in workspace
182182
- `<leader>?` find in directory
183183
- `<leader>*` find word in workspace
184-
- `';' jump to previous position`
185-
- `',' jump to next position`
184+
- `[; jump to previous position`
185+
- `]; jump to next position`
186186
- `''` jump to position before last jump
187187
- `'.` jump to position where last change was made
188188
- `'{a-z}'` jump to marked position

0 commit comments

Comments
 (0)