Vim: Launch Vim with a predefined search string

I wanted to launch Vim with a search string already set. That way I could load my file, and just hit N to jump to that location.

vim myfile.txt +/search_text

Whatever you set search_text to, will pre-fill the search buffer.

Leave A Reply
All content licensed under the Creative Commons License