mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-25 12:44:35 +00:00
Add some more mappings
This commit is contained in:
parent
46ca9189af
commit
50a139f0f0
|
@ -59,6 +59,18 @@ m.keymap("v", "<space>", "zf")
|
|||
m.keymap("n", "K", "10k")
|
||||
m.keymap("n", "J", "10j")
|
||||
|
||||
-- Moving lines around
|
||||
m.keymap("v", "<A-j>", ":m '>+1<CR>gv=gv")
|
||||
m.keymap("v", "<A-k>", ":m '<-2<CR>gv=gv")
|
||||
m.keymap("i", "<A-j>", "<esc>:m .+1<CR>==i")
|
||||
m.keymap("i", "<A-k>", "<esc>:m .-2<CR>==i")
|
||||
m.keymap("n", "<leader>j", ":m .+1<CR>==")
|
||||
m.keymap("n", "<leader>k", ":m .-2<CR>==")
|
||||
|
||||
-- Quick word replacing (use . for next word)
|
||||
m.keymap("n", "cn", "*``cgn")
|
||||
m.keymap("n", "cN", "*``cgN")
|
||||
|
||||
-- Enable/Disable auto commenting
|
||||
m.keymap("n", "<leader>c", ":setlocal formatoptions-=cro<CR>")
|
||||
m.keymap("n", "<leader>C", ":setlocal formatoptions+=cro<CR>")
|
||||
|
@ -67,6 +79,10 @@ m.keymap("n", "<leader>C", ":setlocal formatoptions+=cro<CR>")
|
|||
m.keymap("v", "<", "<gv")
|
||||
m.keymap("v", ">", ">gv")
|
||||
|
||||
-- Center (and unfold) after going to next/prev search item
|
||||
m.keymap("n", "n", "nzzzv")
|
||||
m.keymap("n", "N", "Nzzzv")
|
||||
|
||||
-- System clipboard copying
|
||||
m.keymap("v", "<C-c>", '"+y')
|
||||
|
||||
|
|
Loading…
Reference in a new issue