Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
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
non 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
<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
/testis case-insensitive, and
/t.st\rmatches 'test', 'tast', 'tost', etc.
Case-sensitivity behaves the same way for regular expressions --.
/t.st\rwill match 'TosT', but
/t.st\r\Iwill only match 'tast', 'tost', etc
- Blackslashes themselves can be escaped, so
/test\\will match 'test\'.