Feat: add centering and moving bloc remap

This commit is contained in:
Bertrand Benjamin 2022-12-21 05:10:48 +01:00
parent 600b328691
commit 74e33d46b2

View File

@ -15,3 +15,12 @@ map('v', '>', '>gv', {})
-- Automatically spell check last error in insert mode
map('i', '<c-f>', '<c-g>u<Esc>[s1z=`]a<c-g>u', default_opts)
-- Centering after moving half page or search
vim.keymap.set("n", "<C-d>", "<C-d>zz")
vim.keymap.set("n", "<C-u>", "<C-u>zz")
vim.keymap.set("n", "n", "nzzzv")
vim.keymap.set("n", "N", "Nzzzv")
-- Move block on visual mode
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")