chg: Use cleaner method for adding empty newlines

This commit is contained in:
Sayantan Santra 2024-03-28 03:44:24 -05:00
parent 30a83e6a1d
commit 3529b19864
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F
3 changed files with 10 additions and 11 deletions

View file

@ -23,14 +23,14 @@ map({ 'v', 'n' }, '<leader>d', '"_d', { remap = false })
map('n', '<leader>D', '"_D', { remap = false })
map('n', '<leader>x', '"_x', { remap = false })
-- Insert a newline in normal mode by ,o
map('n', '<leader>o', "o<Esc>k", { remap = false })
map('n', '<leader>O', "O<Esc>j", { remap = false })
-- Insert a newline in normal mode by ,o and ,O
map('n', '<leader>o', ":call append(line('.'), '')<cr>", { remap = false })
map('n', '<leader>O', ":call append(line('.')-1, '')<cr>", { remap = false })
-- Use ,u for redo
map('n', '<leader>u', "<c-r>", { remap = false })
-- Buffer related keymaps
-- Browser like keymaps
map('n', '<leader>k', ":bnext<cr>", { remap = false })
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
map('n', '<leader>w', ":bdelete<cr>", { remap = false })

View file

@ -13,17 +13,16 @@ map('n', '<leader>D', '"_D', { remap = false })
map('n', '<leader>x', '"_x', { remap = false })
-- Insert a newline in normal mode by ,o
map('n', '<leader>o', "o<Esc>k", { remap = false })
map('n', '<leader>O', "O<Esc>j", { remap = false })
map('n', '<leader>o', ":call append(line('.'), '')<cr>", { remap = false })
map('n', '<leader>O', ":call append(line('.')-1, '')<cr>", { remap = false })
-- Use ,u for redo
map('n', '<leader>u', "<c-r>", { remap = false })
-- Find files using fzf by ,f
map('n', '<leader>f', ":Files<cr>", { remap = false })
-- Buffer related keymaps
-- Browser like keymaps
map('n', '<leader>k', ":bnext<cr>", { remap = false })
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
map('n', '<leader>w', ":bdelete<cr>", { remap = false })

View file

@ -12,8 +12,8 @@ map('n', '<leader>D', '"_D', { remap = false })
map('n', '<leader>x', '"_x', { remap = false })
-- Insert a newline in normal mode by ,o
map('n', '<leader>o', "o<Esc>k", { remap = false })
map('n', '<leader>O', "O<Esc>j", { remap = false })
map('n', '<leader>o', ":call append(line('.'), '')<cr>", { remap = false })
map('n', '<leader>O', ":call append(line('.')-1, '')<cr>", { remap = false })
-- Use ,u for redo
map('n', '<leader>u', "<c-r>", { remap = false })
@ -21,7 +21,7 @@ map('n', '<leader>u', "<c-r>", { remap = false })
-- Find files using fzf by ,f
map('n', '<leader>f', ":Files<cr>", { remap = false })
-- Buffer related keymaps
-- Browser like keymaps
map('n', '<leader>k', ":bnext<cr>", { remap = false })
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
map('n', '<leader>w', ":bdelete<cr>", { remap = false })