Thursday, June 21, 2012

Re: Can vim be made to start with selected files already open?

On Jun 21, 2012, at 2:26 PM, Gary Johnson wrote:

> Rather than use a bash alias, since Eric said he seldom uses a
> terminal, why not just put a Vim command in ~/.vimrc? For example,
> instead of
>
> alias vimf='vim -o file1 file2 file3 file4'
>
> use
>
> command All :args file1 file2 file3 file4 <bar> all
>
> or to open all those files in individual tabs,
>
> command All :args file1 file2 file3 file4 <bar> tab all
>
> Then, whenever you want to open all those files, just execute
>
> :All
>
> Of course, for that to work as written, all those files will have to
> be in the working directory. It would probably be better to use
> their full path names. On the other hand, if you always open gvim
> by clicking an icon on your desktop, your working directory may
> already be set appropriately.

Thanks, Gary. So many options. I think it will be either this, and alias, or session.vim. The latter looks pretty cool, but since at this point I envision myself only ever saving one session always referencing the same set of files, it might be overkill.

------------------------------------------------------------------------------------------
Eric Weir

"You will be needed in the movement when you realize
that you are not needed in the movement."

- Chris Crass

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: