VI pattern matching
Editing documents using vi is something of pain, especially when they are long and you know the bit you are after is buried somewhere in the middle. There is a similar to way to the Find command in GUI editors that allows you to jump to that section:
-
/yourPattern
Simply substitute 'yourPattern' for the string you are looking for and after hitting return, the cursor will jump to the first found match. If you wish to see the next one, then simply type '/' (without the quotation marks) and hit return again.
About this entry
You’re currently reading “VI pattern matching,” an entry on gregs
- Published:
- Thursday, June 29th, 2006 at 12:00 am
- Author:
- gregs
- Category:
- *nix
No comments
Jump to comment form | comments rss | trackback uri