Difference between revisions of "Passing Vim's arguments via :edit command"
(Initial version of the page)
Revision as of 16:08, 24 July 2014
You can pass arbitrary of Vim's arguments to
:edit command. For example, the
following command opens Vim with buffer named
:edit +set\ filetype=sh script
For convenience one can define a command to start editing files in Vim forcing desired value of
:command new :edit +set\ filetype=%a
And use it like:
:new sh script
which is equal to the first command.