Question Details

No question body available.

Tags

vim

Answers (3)

February 28, 2026 Score: 2 Rep: 199,695 Quality: Medium Completeness: 80%

So, do someone have an ideas how to properly map ?

What you are doing is how you are supposed to do it. That / discrepancy seems to point to a terminal/environment issue. Note that this specific is not listed under :help terminal-key-codes, which adds to the confusion. Something in your stack is messing with key codes.

FWIW, Vim uses ^[ for many things. It is generally recommended to not map it.

Or maybe other ways to conveniently disable search matches highlighting?

:help 'incsearch' has this (I think it should be under :help :nohlsearch instead):

augroup vimrc-incsearch-highlight
    autocmd!
    autocmd CmdlineEnter [\/\?] :set hlsearch
    autocmd CmdlineLeave [\/\?] :set nohlsearch
augroup END

You can also try one of the various plugins designed around that use case. Mine, vim-cool is over there.

February 28, 2026 Score: 1 Rep: 35 Quality: Low Completeness: 100%

Seems like problems with integration between vim and kitty. Idk on which side. + Vim has problems with remapping in vimrc because it uses escape code on startup to communicate with terminal.

In short - simplest solution is to choose another key instead of .

Weird hack for the brave ones:

func! EscMapSetup(timerid)
    nnoremap  :nohlsearch
endfunc

autocmd VimEnter * call timer_start(100, 'EscMapSetup')

Some related links:

February 28, 2026 Score: 0 Rep: 24,883 Quality: Low Completeness: 50%

I have this in my vimrc and it has worked perfectly:

set hlsearch

" Clear highlights. " We need this noop mapping before, otherwise " the esc mapping will just completely break. nnoremap \ \ nnoremap :noh

" Removes delay from closing fzf search popup. tnoremap \ \ tnoremap

Can't remember all the nuances in originally constructing it like this.