I want to write some mappings so I can move faster between the code. The problem is that I have hlsearch on(and i don't want it off) so I did it like this:
au BufNewFile,BufRead *.py
nnoremap <Leader>r /return<CR>:noh<CR>
nnoremap <Leader>nf /def .*(.*):<CR>:noh<CR>
nnoremap <Leader>pf ?def .*(.*):<CR>:noh<CR>
nnoremap <Leader>nc /class<CR>:noh<CR>
nnoremap <Leader>pc ?class<CR>:noh<CR>
I added :noh<CR>
to disable highlighting after search, but that makes "flickering" effect which is unpleasing.
Is there a way to disable highlighting just for the next search or other solution?