I am using the following two items in my mapping:
set hlsearch nnoremap <esc><esc> :noh<return>
When I search I normally like to see highlighting, and then once I get to 'where I want', I disable the highlighting. However, it seems whenever I run a function, I lose the
:noh and my search results keep re-highlighting. Is this a common issue, and if so, how is it dealt with? For a function in my
vimrc would the following work?
func MyFunction() call execute('noh') " rest of function... endfunc