chg: Use cleaner method for adding empty newlines
This commit is contained in:
parent
30a83e6a1d
commit
3529b19864
3 changed files with 10 additions and 11 deletions
|
@ -23,14 +23,14 @@ map({ 'v', 'n' }, '<leader>d', '"_d', { remap = false })
|
||||||
map('n', '<leader>D', '"_D', { remap = false })
|
map('n', '<leader>D', '"_D', { remap = false })
|
||||||
map('n', '<leader>x', '"_x', { remap = false })
|
map('n', '<leader>x', '"_x', { remap = false })
|
||||||
|
|
||||||
-- Insert a newline in normal mode by ,o
|
-- Insert a newline in normal mode by ,o and ,O
|
||||||
map('n', '<leader>o', "o<Esc>k", { remap = false })
|
map('n', '<leader>o', ":call append(line('.'), '')<cr>", { remap = false })
|
||||||
map('n', '<leader>O', "O<Esc>j", { remap = false })
|
map('n', '<leader>O', ":call append(line('.')-1, '')<cr>", { remap = false })
|
||||||
|
|
||||||
-- Use ,u for redo
|
-- Use ,u for redo
|
||||||
map('n', '<leader>u', "<c-r>", { remap = false })
|
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>k', ":bnext<cr>", { remap = false })
|
||||||
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
|
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
|
||||||
map('n', '<leader>w', ":bdelete<cr>", { remap = false })
|
map('n', '<leader>w', ":bdelete<cr>", { remap = false })
|
||||||
|
|
|
@ -13,17 +13,16 @@ map('n', '<leader>D', '"_D', { remap = false })
|
||||||
map('n', '<leader>x', '"_x', { remap = false })
|
map('n', '<leader>x', '"_x', { remap = false })
|
||||||
|
|
||||||
-- Insert a newline in normal mode by ,o
|
-- Insert a newline in normal mode by ,o
|
||||||
map('n', '<leader>o', "o<Esc>k", { remap = false })
|
map('n', '<leader>o', ":call append(line('.'), '')<cr>", { remap = false })
|
||||||
map('n', '<leader>O', "O<Esc>j", { remap = false })
|
map('n', '<leader>O', ":call append(line('.')-1, '')<cr>", { remap = false })
|
||||||
|
|
||||||
-- Use ,u for redo
|
-- Use ,u for redo
|
||||||
map('n', '<leader>u', "<c-r>", { remap = false })
|
map('n', '<leader>u', "<c-r>", { remap = false })
|
||||||
|
|
||||||
|
|
||||||
-- Find files using fzf by ,f
|
-- Find files using fzf by ,f
|
||||||
map('n', '<leader>f', ":Files<cr>", { remap = false })
|
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>k', ":bnext<cr>", { remap = false })
|
||||||
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
|
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
|
||||||
map('n', '<leader>w', ":bdelete<cr>", { remap = false })
|
map('n', '<leader>w', ":bdelete<cr>", { remap = false })
|
||||||
|
|
|
@ -12,8 +12,8 @@ map('n', '<leader>D', '"_D', { remap = false })
|
||||||
map('n', '<leader>x', '"_x', { remap = false })
|
map('n', '<leader>x', '"_x', { remap = false })
|
||||||
|
|
||||||
-- Insert a newline in normal mode by ,o
|
-- Insert a newline in normal mode by ,o
|
||||||
map('n', '<leader>o', "o<Esc>k", { remap = false })
|
map('n', '<leader>o', ":call append(line('.'), '')<cr>", { remap = false })
|
||||||
map('n', '<leader>O', "O<Esc>j", { remap = false })
|
map('n', '<leader>O', ":call append(line('.')-1, '')<cr>", { remap = false })
|
||||||
|
|
||||||
-- Use ,u for redo
|
-- Use ,u for redo
|
||||||
map('n', '<leader>u', "<c-r>", { remap = false })
|
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
|
-- Find files using fzf by ,f
|
||||||
map('n', '<leader>f', ":Files<cr>", { remap = false })
|
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>k', ":bnext<cr>", { remap = false })
|
||||||
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
|
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
|
||||||
map('n', '<leader>w', ":bdelete<cr>", { remap = false })
|
map('n', '<leader>w', ":bdelete<cr>", { remap = false })
|
||||||
|
|
Loading…
Reference in a new issue