I use / followed by word to be searched to search for a word in a document. However once I find the word pressing escape just takes me back to the cursor location which is at the beginning of the document, while the word I need is somewhere in the middle. Is there a shortcut key to jump to the location of the currently highlighted word after a word search?
Asked
Active
Viewed 1,334 times
1 Answers
4
Just press "Enter"!
What you're seeing is the result of set incsearch, which will show you the results of the search incrementally as you type... But you won't move to the actual match until you execute the search, by pressing the "Enter" key.
filbranden
- 28,785
- 3
- 26
- 71
-
2
-
1@user13267 I know the feeling...
incsearchcan be quite disorienting when you start using it... Takes a while to get used to it. – filbranden Sep 11 '20 at 06:03
xflag in 'cpo'. See Stay at matching search result after escape. – user938271 Sep 11 '20 at 14:38