Updated config
This commit is contained in:
parent
7085c0afa9
commit
7547ef0ff1
11 changed files with 127 additions and 6 deletions
|
@ -17,9 +17,15 @@ map({"n", "v"}, "Q", "<cmd>qa!<cr>", "Force quit")
|
|||
-- Clear search with Esc
|
||||
map({"n", "i"}, "<esc>", "<cmd>noh<cr><esc>", "Clear search")
|
||||
|
||||
-- Change with c changes the entire word
|
||||
map("n", "c", "ciw", "Change word")
|
||||
|
||||
-- Ctrl S to save the file from any mode
|
||||
map({"n", "i", "s", "v"}, "<C-s>", "<cmd>w<cr><esc>", "Save file")
|
||||
|
||||
-- Ctrl Space for auto complete
|
||||
map("i", "<C-Space>", "<C-x><C-o>", "Auto complete")
|
||||
|
||||
-- Grab the line and move it up/down
|
||||
map("n", "<C-j>", "<cmd>set paste<cr>m`O<esc>``<cmd>set nopaste<cr>", "Add empty line above")
|
||||
map("n", "<C-k>", "m`<cmd>-g/\\m^\\s*$/d<cr>``<cmd>noh<cr>", "Delete empty line above")
|
||||
|
@ -29,6 +35,8 @@ map("n", "<A-j>", "<cmd>set paste<cr>m`o<esc>``<cmd>set nopaste<cr>", "Add empty
|
|||
map("n", "<A-k>", "m`<cmd>+g/\\m^\\s*$/d<cr>``<cmd>noh<cr>", "Delete empty line below")
|
||||
|
||||
-- Horizontal movement
|
||||
map({"n", "v"}, "<C-h>", "b", "Back one word")
|
||||
map({"n", "v"}, "<C-l>", "w", "Forward one word")
|
||||
map({"n", "v"}, "H", "^", "Beginning of line")
|
||||
map({"n", "v"}, "L", "<end>", "End of line")
|
||||
|
||||
|
@ -42,6 +50,9 @@ map("n", "<S-Tab>", "V<gv<esc>")
|
|||
map("v", "<Tab>", ">gv")
|
||||
map("v", "<S-Tab>", "<gv")
|
||||
|
||||
-- Toggle comment
|
||||
map({"n", "v"}, "<C-/>", "<cmd>ToggleComment<cr>", "Toggle comment")
|
||||
|
||||
-- Toggle word
|
||||
map("n", "<Bslash>", "<cmd>ToggleWord<cr>", "Toggle word")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue