35
9
In Vim, I know that /
will search forward from the cursor, with n
and N
repeating the search forward and backward, respectively.
I also know that ?
will search backward from the cursor, with n
and N
repeating the search backward and forward, respectively.
My question is, if I've done a ?
search, and I want to re-run that as a /
search (so I don't have to keep holding shift to move forward), is there a way to switch the previous search's direction without retyping the search term?
Just a minor thing (looks pretty obvious), but I did miss it. You have to navigate to end of the file (ctrl + end) to reverse search it. – dimuthu – 2017-10-24T05:27:30.063
Wow, that was way easier than I thought. :) Thanks! – Nathan Long – 2011-02-08T14:36:12.183
Hmmm, and apparently, ? or / followed by the up key cycles through a common history for the two. I thought each had their own history. – Nathan Long – 2011-02-08T14:40:08.760