Thursday, June 21, 2012

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

First, I want to thank everyone who responded on this thread, and to apologize for taking so long to get around to responding. After raising the issue, other things became higher priority, and I just didn't have time to respond to all the interesting suggestions.

In the interim I did encounter one of the problems with 'mksession' that was mentioned, i.e., that it preserves all your vim settings as of the time it was executed, and when the file is sourced it will override any changes to the settings subsequent to executing 'mksession'. In trying to diagnose a problem I was having I was experimenting with disabling plugins or changing items in my .vimrc relating to them, then restarting vim. At first I continued sourcing the 'mksession' file after restarting, till I realized it was overwriting the changes I had made. So I'd like to find a method that avoids this problem.

On Jun 6, 2012, at 4:24 AM, Christian Brabandt wrote:

> On Tue, June 5, 2012 23:39, Eric Weir wrote:
>> I'll give it a try. At this point at least the built-in :mksession does
>> what I wanted to do. The advantage of this for me is that I could have it
>> automatically load a default saved session.
>
> You seem to be fine with session files, but I think, I also mention
> that you can store the buffer list in your .viminfo file, if you add
> the '%' to the 'viminfo' setting. Additionally, you can always edit
> the file you have previously edited using the :oldfiles command.
>
> For more info on both of this, read
> :h 21.3

I'm guessing that saving the buffer list will avoid the problem I describe above, but also that I wouldn't want to save everything in the buffer, just a few items. ? But I will check it out. Thanks for the suggestion.

------------------------------------------------------------------------------------------
Eric Weir
eeweir@bellsouth.net

"Any assurance economists pretend to with
regard to cause and effect is merely a pose."

- Emanuel Derman






--
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: