1.12.2012

start a search when opening a file in vi

To start a search when opening a file: vi +/Search_string /tmp/filename
It'll open a vi session placing your cursor at the start of the line containing the first match of the keyword.   You can hit 'n' to continue the search like normal

No comments: