To open a file to the first instance of a search term, use the following command line with vim:
vi +/searchterm filename
You can search for the text “word1 word2” from the file filename.txt in at least two ways, vi +/word1 \ word2 filename.txt
vi +/"word1 word2" file.txt
No comments:
Post a Comment