mirror of
https://salsa.debian.org/debian/debian-reference.git
synced 2026-01-11 20:07:28 +00:00
nohlsearch with <ESC> like Lazyvim
Signed-off-by: Osamu Aoki <osamu@debian.org>
This commit is contained in:
parent
f43210ee44
commit
f85a1fc32d
1 changed files with 11 additions and 0 deletions
|
|
@ -285,6 +285,14 @@ set spelllang=en_us,cjk " :h 'spl -- english spell, ignore CJK</screen>
|
|||
These are taken from most popular settings
|
||||
"silent!" is needed to avoid error due to difference of Vim/Nvim
|
||||
I understand n and N remap may be avoided if scrolloff is big enough but I like it this way.
|
||||
How to cope with remapped <C-L>
|
||||
* Vim: <C-L> Clears and redraws the screen with "clear highlight"
|
||||
* Nvim <C-L> Clears and redraws the screen with "clear highlight" and "diff update"
|
||||
nnoremap <C-L> <Cmd>nohlsearch<Bar>diffupdate<Bar>normal! <C-L><CR>
|
||||
* Lazyvim uses: map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", ...)
|
||||
==> Remap <ESC> like Lazyvim (not exacly as Nvim <C-L> for now)
|
||||
nnoremap <ESC> <CMD>noh<CR><ESC>
|
||||
inoremap <ESC> <CMD>noh<CR><ESC>
|
||||
-->
|
||||
<screen>""" *** popular mappings ***
|
||||
""" Window moves without using CTRL-W which is dangerous in INSERT mode
|
||||
|
|
@ -292,6 +300,9 @@ nnoremap <C-H> <C-W>h
|
|||
nnoremap <C-J> <C-W>j
|
||||
nnoremap <C-K> <C-W>k
|
||||
silent! nnoremap <C-L> <C-W>l
|
||||
""" nohlsearch with <ESC> (<C-L> is mapped as above)
|
||||
inoremap <ESC> <CMD>noh<CR><ESC>
|
||||
nnoremap <ESC> <CMD>noh<CR><ESC>
|
||||
""" execute macro recorded with <ESC>qq.....<ESC>q with Q
|
||||
nnoremap Q @q
|
||||
""" center after jump next
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue