:Ralf Schmitt wrote:
Thanks for your quick answer!
Indeed, I mixed up command and option. So now I have
these entires in my .vimrc now
" enable highlighted search featue
set hlsearch
" disable highlighted search on startup
:nohlsearch
But this does not work either. My main goal is, that I don't
want to see 'old' searches highlighted on vim startup. Maybe
there is a better way to achieve this. Something like
set remember_old_searchpattern=off ???
best regards
Ralf
Method I:
:set viminfo+=h
This sets a flag in the viminfo file, so that the last search before the
restart will not be displayed even if 'hlsearch' is on. This will only be
effective after the _next_ time the viminfo is loaded, i.e., probably the next
run of Vim after this flag is set.
Method II:
:let @/ = ""
This sets the "latest search" register to the empty string, so that nothing
will be highlighted. Earlier searches can still be remembered by using the
<Up> key after hitting / or ? and optionally the "start" of the string to be
searched.
See
:help 'viminfo'
:help :let-register
Best regards,
Tony.