Sublime Forum

Emulate vim search highlighting

#1

When using vim to search for a word, I would hit /foo followed by esc. This would highlight all instances of foo and allow me to navigate the document again.

I want to emulate this in Sublime Text 2 using Vintage. Currently, I hit /foo and all instances of foo are highlighted. However, the cursor remains in the search box, so I can’t navigate the document using hjkl etc. Pressing esc moves the cursor out of the search box into the document, but also de-highlights all the search matches.

How can I keep matching strings highlighted after pressing esc in Sublime Text 2 search?

0 Likes

#2

The only way from the keyboard, at least that I’m aware of, is to press Ctrl+1 to focus back on the main document area. When you’ve split the view into panes/groups this is more complicated, since the Ctrl+number actually focuses on a Group/Pane.

Once you’ve closed the find panel with Esc, highlights disappear - but you can still search for next/previous occurrences by pressing F3/Shift+F3.

0 Likes