aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/home/.config/nvim/lua/config
diff options
context:
space:
mode:
authorLibravatar sommerfeld <[email protected]>2026-04-17 10:53:54 +0100
committerLibravatar sommerfeld <[email protected]>2026-04-17 10:53:54 +0100
commit7a3aa50d7fb712eb17a68b8c6626c65be80e4d48 (patch)
treec9e9cafb250b17fbfeea7cbe40821049e07b3460 /home/.config/nvim/lua/config
parenteb036339bccb2ed58217c808152fee8a99963909 (diff)
downloaddotfiles-7a3aa50d7fb712eb17a68b8c6626c65be80e4d48.tar.gz
dotfiles-7a3aa50d7fb712eb17a68b8c6626c65be80e4d48.tar.bz2
dotfiles-7a3aa50d7fb712eb17a68b8c6626c65be80e4d48.zip
refactor: audit and fix neovim keybinds
- fix visual p register clobbering: use "_dP black-hole pattern - remove ; -> : mapping: restore native repeat-find motion - remove <C-a>/<C-e> -> ^/$ emacs mappings: anti-vim-philosophy - map dial.nvim to <C-a>/<C-x>/g<C-a>/g<C-x> (standard increment keys) - remove redundant <leader>oq diagnostic loclist (covered by <leader>tl) - collapse <leader>{,v,x,t}D type-def onto g{v,x,t}t pattern (0.12 grt) - move <leader>oc/<leader>ic calls to <leader>co/<leader>ci (Code group) - add gvr/gxr/gtr for references in splits - remove empty <leader>s and <leader>d which-key group declarations
Diffstat (limited to 'home/.config/nvim/lua/config')
-rw-r--r--home/.config/nvim/lua/config/keymaps.lua22
1 files changed, 2 insertions, 20 deletions
diff --git a/home/.config/nvim/lua/config/keymaps.lua b/home/.config/nvim/lua/config/keymaps.lua
index 349fc96..366a37e 100644
--- a/home/.config/nvim/lua/config/keymaps.lua
+++ b/home/.config/nvim/lua/config/keymaps.lua
@@ -28,26 +28,14 @@ end
ncmd("<esc>", "nohlsearch")
--- make an accidental ; press also enter command mode
-nmap(";", ":")
-
-- highlight last inserted text
nmap("gV", "`[v`]")
nmap("<down>", "<c-e>")
nmap("<up>", "<c-y>")
--- go to first non-blank character of current line
-nvmap("<c-a>", "^")
-nvmap("<c-e>", "$")
-
--- This extends p in visual mode (note the noremap), so that if you paste from
--- the unnamed (ie. default) register, that register content is not replaced by
--- the visual selection you just pasted over–which is the default behavior.
--- This enables the user to yank some text and paste it over several places in
--- a row, without using a named register
--- map.v('p', "p:if v:register == '"'<Bar>let @@=@0<Bar>endif<cr>")
-vmap("p", 'p:let @+=@0<CR>:let @"=@0<CR>')
+-- paste over selection without clobbering registers
+vmap("p", '"_dP')
-- Find and Replace binds
ncmdi("<localleader>s", "%s/")
@@ -89,12 +77,6 @@ nmap("]e", function()
})
end)
-nmap(
- "<leader>oq",
- vim.diagnostic.setloclist,
- "[O]pen diagnostic [Q]uickfix list"
-)
-
nmap("yp", function()
vim.fn.setreg("+", vim.fn.expand("%"))
end, "[Y]ank [P]ath")