Updated config
This commit is contained in:
@ -9,7 +9,17 @@ map("n", "<C-q>", "<cmd>close<cr>", "Close window")
|
||||
map("n", "<leader>l", "<cmd>Lazy<cr>", "Lazy")
|
||||
map({"n", "v"}, "<leader>q", "<cmd>qa!<cr>", "Quit all")
|
||||
map({"n", "i"}, "<esc>", "<cmd>noh<cr><esc>", "Clear search")
|
||||
map({"n", "i", "s", "v"}, "<C-s>", "<cmd>w<cr>", "Save file")
|
||||
map({"n", "i", "s", "v"}, "<C-s>", "<cmd>w<cr><esc>", "Save file")
|
||||
|
||||
-- Add or delete empty lines
|
||||
map("n", "<C-j>", "<cmd>set paste<cr>m`o<esc>``<cmd>set nopaste<cr>", "Add empty line below")
|
||||
map("n", "<C-k>", "<cmd>set paste<cr>m`O<esc>``<cmd>set nopaste<cr>", "Add empty line above")
|
||||
map("n", "<A-j>", "m`<cmd>+g/\\m^\\s*$/d<cr>``<cmd>noh<cr>", "Delete empty line below")
|
||||
map("n", "<A-k>", "m`<cmd>-g/\\m^\\s*$/d<cr>``<cmd>noh<cr>", "Delete empty line above")
|
||||
|
||||
-- Quick movement
|
||||
map("n", "J", "}", "Next paragraph")
|
||||
map("n", "K", "{", "Previous paragraph")
|
||||
|
||||
-- Editing multiple instances
|
||||
map("n", "<f2>", "*#:%s//<C-r><C-w>/g<left><left>", "Replace word under cursor")
|
||||
@ -54,4 +64,4 @@ map("i", "<S-Right>", "<Esc>v<Right>")
|
||||
map("n", "<A-Up>", "<C-w>k", "Move to the window above")
|
||||
map("n", "<A-Down>", "<C-w>j", "Move to the window below")
|
||||
map("n", "<A-Left>", "<C-w>h", "Move to the window on the left")
|
||||
map("n", "<A-Right>", "<C-w>l", "Move to the window on the right")
|
||||
map("n", "<A-Right>", "<C-w>l", "Move to the window on the right")
|
||||
|
Reference in New Issue
Block a user