After searching for something, if you hit //, you seem to get the next result. How is this different from n? How should you use it? What does //e match, and what other options are there for //?
After searching for something, if you hit // , you seem to get the
Share
The search command is of the following format:
If the
patternpart is left out, the search looks for the last pattern that was searched for. If the offset is left out, no offset is applied. The offset is basically what to do to the cursor once you’ve found yourpatternitem.Most
viusers are familiar with the variation without an offset,/pax<cr>and the repeat last search,/<cr>, which is equivalent ton.In your specific examples,
//<cr>is the same as/<cr>and it means repeat the last search and apply no offset.On the other hand,
//e<cr>means to repeat the last search and move the cursor to the end of the found item. The offsets are:A plus or minus without a
numuses1.