Searching again with // Thu, 20 Jun 2013
If you’ve searched for something and want to repeat the search again, just use //
.
For example, if you run:
/foo
To search forward for foo
, and then later on you want to repeat this search, you can simply run:
//
This also works in substitutions. Say you’ve searched /foo
and now want to replace it, there’s no need to type foo
again:
:%s//bar/g
Will replace all instances of foo
with bar
(presuming /foo
was your last search).