[ # cursor navigation { # scroll down, recenter key = ""; action = "zz"; mode = "n"; } { # scroll up, recenter key = ""; action = "zz"; mode = "n"; } # searching { # center cursor after search next key = "n"; action = "nzzzv"; mode = "n"; } { # center cursor after search previous key = "N"; action = "Nzzzv"; mode = "n"; } { # ex command key = "pv"; action = "Ex"; mode = "n"; } # search and replace { # search and replace word under cursor key = "s"; action = ":%s///gI"; mode = "n"; } # search and replace selected text { key = "s"; action = "y:%s/0/0/gI"; mode = "v"; } # clipboard operations { # copy to system clipboard in visual mode key = ""; action = ''"+y ''; mode = "v"; } { # paste from system clipboard in visual mode key = ""; action = ''"+p ''; mode = "v"; } { # yank to system clipboard key = "Y"; action = "+Y"; mode = "n"; } { # replace selected text with clipboard content key = "p"; action = "_dP"; mode = "x"; } { # delete without copying to clipboard key = "d"; action = "_d"; mode = [ "n" "v" ]; } # line operations { # move lines down in visual mode key = "J"; action = ":m '>+1gv=gv"; mode = "v"; } { # move lines up in visual mode key = "K"; action = ":m '<-2gv=gv"; mode = "v"; } { # join lines key = "J"; action = "mzJ`z"; mode = "n"; } # quickfix { # Run make command key = "m"; action = ":make"; mode = "n"; } { # previous quickfix item key = ""; action = "cprevzz"; mode = "n"; } { # next quickfix item key = ""; action = "cnextzz"; mode = "n"; } # location list navigation { # previous location list item key = "j"; action = "lprevzz"; mode = "n"; } { # next location list item key = "k"; action = "lnextzz"; mode = "n"; } # disabling keys { # disable the 'Q' key key = "Q"; action = ""; mode = "n"; } # text selection { # select whole buffer key = ""; action = "ggVG"; mode = "n"; } # window operations { # focus next window key = ""; action = ":wincmd W"; options = { noremap = true; silent = true; }; mode = "n"; } { # focus previous window key = ""; action = ":wincmd w"; options = { noremap = true; silent = true; }; mode = "n"; } # window size adjustments { # increase window width key = ""; action = ":vertical resize +5"; options = { noremap = true; silent = true; }; mode = "n"; } { # decrease window width key = ""; action = ":vertical resize -5"; options = { noremap = true; silent = true; }; mode = "n"; } # window closing and opening { # close current window key = "c"; action = ":q"; options = { noremap = true; silent = true; }; mode = "n"; } { # new vertical split at $HOME key = "n"; action = ":vsp $HOME"; options = { noremap = true; silent = true; }; mode = "n"; } # window split orientation toggling { # toggle split orientation key = "t"; action = ":wincmd T"; options = { noremap = true; silent = true; }; mode = "n"; } # spell checking { # toggle spell checking key = "ss"; action = ":setlocal spell!"; options = { noremap = true; silent = true; }; mode = "n"; } { # switch to english spell checking key = "se"; action = ":setlocal spelllang=en_us"; options = { noremap = true; silent = true; }; mode = "n"; } { # switch to german spell checking key = "sg"; action = ":setlocal spelllang=de_20"; options = { noremap = true; silent = true; }; mode = "n"; } { # move to next misspelling key = "]s"; action = "]szz"; options = { noremap = true; silent = true; }; mode = "n"; } { # move to previous misspelling key = "[s"; action = "[szz"; options = { noremap = true; silent = true; }; mode = "n"; } { # correction suggestions for a misspelled word key = "z="; action = "z="; options = { noremap = true; silent = true; }; mode = "n"; } { # adding words to the dictionary key = "zg"; action = "zg"; options = { noremap = true; silent = true; }; mode = "n"; } # buffer navigation { # next buffer key = ""; action = ":bnext"; options = { noremap = true; silent = true; }; mode = "n"; } { # previous buffer key = ""; action = ":bprevious"; options = { noremap = true; silent = true; }; mode = "n"; } { # close current buffer key = "bd"; action = ":bdelete"; options = { noremap = true; silent = true; }; mode = "n"; } { # apply code action key = "ca"; action = ":lua vim.lsp.buf.code_action()"; options = { noremap = true; silent = true; }; mode = "n"; } ]