Skip to content

Find Mode

Chen XI edited this page Feb 22, 2018 · 9 revisions

How To

To search, first press / then the search expression followed by <Enter>. You can alternate between the matches by typing n to go forward and <Shift-n> to go back.


  • Find queries are global and persistent -- if you search for 'test' in one tab, pressing n on any other tab will search for 'test' as well.
  • If your search matches the contents of an input whose contents you wish to modify, press <Esc> to enter insert mode and begin editing.
  • Find queries have a history. Use <Up> and <Down> to re-use previous queries.

Case-sensitivity and RegExps

  • Find mode uses smartcase -- it defaults to a case-insensitive search if you use only lower-case characters, but switches to case-sensitive mode upon detecting upper-case letters. Hence /test is case-insensitive, and /Test is case-sensitive.
  • The \r escape sequence ensures that the search string gets treated like a Javascript regular expression, so /\r matches 'test', 'tast', 'tost', etc.
  • Case-sensitivity behaves the same way for regular expressions -- /\r will match 'TosT', but /\r\I will only match 'tast', 'tost', etc.
  • Blackslashes themselves can be escaped, so /test\\ will match 'test\'.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.