Search Forward in Vim (macOS)
Press Slash to search for a pattern from the cursor towards the end of the file.
What it does
The cursor jumps to the command line at the bottom. Type the text or the pattern and press Enter, and Vim moves to the next match after the cursor. One key repeats the search in the same direction and its capital in the opposite one. The search takes regular expressions. When it reaches the end of the file, it continues from the top.
The same shortcut on other platforms
| Platform | Shortcut |
|---|---|
| macOSthis page | Slash |
| Linux |
More Vim shortcuts: Search
- Search Backward
- Next Match
- Previous Match
All 38 Vim shortcuts for macOSThe full list has a search and a printable PDF.
Questions
What is the Vim shortcut for Search Forward on macOS?
/ (Slash). Press it to search for a pattern from the cursor towards the end of the file.
What is the shortcut for Search Forward in Vim on Linux?
On Linux it is /.