1

Re: Clear search pattern?

Hi,

Just wondering if anyone knows a nice way to clear the currently used search pattern (so all the highlighting gets removed)? In regular Vim I just have a script defined that does

let @/ = ""

Of course, I can't use anything like that in ViEmu for now, so I usually just hit / and then a bunch of random characters to clear the search. It's no big deal, but any suggestions?

Thanks,
Ben.

2

Re: Clear search pattern?

Ben, you can use the :nohlsearch command (can be abbreviated to :noh), which removes highlighting until the next search performed. You can map this to a key combo, say Ctrl+Shift+H, with this command:

  :nnoremap <c-s-h> :noh<return>

And you can put this into _viemurc in your home directory (to where HOMEDRIVE and HOMEPATH point to) for ViEmu to load it on every start up.

By the way, :noh is a vim command, so you can use it there too!