To reset the most recent search pattern (used by ‘n’ and ‘N’, among others), do:
:let @/= “”
Setting it to an empty string actually sets it to nothing. Put a different pattern in the quotes if you prefer.
(I’ve found this useful when setting up complex search/replace macros.)
Advertisement
Tags: vim