Updated config
This commit is contained in:
@ -4,17 +4,28 @@ end
|
||||
|
||||
-- Basics
|
||||
map("n", ";", ":", "Command mode")
|
||||
map("n", "qq", "<cmd>qa!<cr>", "Quit all")
|
||||
map("n", "U", "<cmd>redo<cr>", "Redo")
|
||||
map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", "Clear search")
|
||||
map({ "i", "n", "s", "v" }, "<C-s>", "<cmd>w<cr><esc>", "Save file")
|
||||
map("n", "<C-l>", "^Da", "Rewrite line")
|
||||
map("i", "<C-l>", "<esc>^Da", "Rewrite line")
|
||||
map("n", "<C-a>", "ggVG", "Select all")
|
||||
map("n", "<C-r>", ":%s/<C-R><C-W>//g<Left><Left>", "Replace word under cursor")
|
||||
map({ "n", "v" }, "<C-b>", "^", "Beginning of line")
|
||||
map("i", "<C-b>", "<esc>^i", "Beginning of line")
|
||||
map({ "i", "n", "v" }, "<C-e>", "<end>", "End of line")
|
||||
map("n", "qq", "<cmd>qa!<cr>", "Quit all")
|
||||
|
||||
-- Editing multiple instances
|
||||
map("n", "<C-d>", "*#", "Search word under cursor")
|
||||
map("n", "<C-r>", "*#:%s//<C-r><C-w>", "Replace word under cursor")
|
||||
map("v", "<C-d>", "y/<C-r>\"<cr>N", "Search selection")
|
||||
map("v", "<C-r>", "y/<C-r>\"<cr>N:%s//<C-r>\"", "Replace selection")
|
||||
|
||||
-- Increasing and decreasing numbers
|
||||
map("n", "+", "<C-a>", "Increase number")
|
||||
map("n", "-", "<C-x>", "Decrease number")
|
||||
map("n", "<kPlus>", "<C-a>", "Increase number")
|
||||
map("n", "<kMinus>", "<C-x>", "Decrease number")
|
||||
|
||||
-- Buffer management
|
||||
map("n", "<C-n>", "<cmd>enew<cr>", "New file")
|
||||
|
Reference in New Issue
Block a user