nvim: keymappings: Fix mapping for replace word
With silent set, we could not provide the input at the command line. Also, the c. mapping wasn't suppose to have <CR>.
This commit is contained in:
parent
c806eafe5c
commit
71fae03c07
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
local remap = vim.api.nvim_set_keymap
|
local remap = vim.api.nvim_set_keymap
|
||||||
local expr_opts = { noremap=true, silent=true, unique=true, expr=true }
|
local expr_opts = { noremap=true, unique=true, expr=true }
|
||||||
local opts = { noremap=true, silent=true, unique=true }
|
local opts = { noremap=true, unique=true }
|
||||||
|
|
||||||
remap('c', '<Esc>', '<C-C>', opts)
|
remap('c', '<Esc>', '<C-C>', opts)
|
||||||
-- Use Q to execute default register.
|
-- Use Q to execute default register.
|
||||||
|
@ -11,7 +11,7 @@ remap('v', '<Leader>Y', '"*y' , opts)
|
||||||
remap('n', '<Leader>p', '<ESC>"+p', opts)
|
remap('n', '<Leader>p', '<ESC>"+p', opts)
|
||||||
remap('n', '<Leader>P', '<ESC>"*p', opts)
|
remap('n', '<Leader>P', '<ESC>"*p', opts)
|
||||||
-- Search and Replace
|
-- Search and Replace
|
||||||
remap('n', 'c.' , ':%s//g<Left><Left><CR>' , opts)
|
remap('n', 'c.' , ':%s//g<Left><Left>' , opts)
|
||||||
remap('n', '<Leader>c.', ':%s/\\<<C-r><C-w>\\>//g<Left><Left>', opts)
|
remap('n', '<Leader>c.', ':%s/\\<<C-r><C-w>\\>//g<Left><Left>', opts)
|
||||||
-- Quit
|
-- Quit
|
||||||
remap('n', '<Leader>x', '<Esc>:x<CR>' , opts)
|
remap('n', '<Leader>x', '<Esc>:x<CR>' , opts)
|
||||||
|
|
Loading…
Reference in a new issue