Thursday, January 21, 2016

Re: simple vim startup question

On Thu, Jan 21, 2016 at 12:36 PM, <christoph.kliemt@pgxml.net> wrote:
> Tony Mechelynck <antoine.mechelynck@gmail.com> writes:
>
>> On Thu, Jan 21, 2016 at 10:20 AM, <christoph.kliemt@pgxml.net> wrote:
>
> [...]
>
>>> The files have to be read in this sequence:
>>> 1) ~/.vimrc
>>> 2) project-specific-default-settings
>>> 3) theSession
>
> [...]
>
>> vim -S project-settings.vim -S theSession.vim
>>
>> (for files in Vimscript language the extension .vim is recommended,
>> though .vimrc and .gvimrc do not follow the rule)
>>
>> See :help -S
>>
>> The important sentence there is «It can be mixed with "-c" arguments
>> and repeated like "-c".»
>
> Thank you, this is what missed. One more question.
> The manual says: The {file} will be sourced after the first file has
> been read.
>
> What file is the "first file"? Is this a .vimrc, or is this the first
> file from the commandline that is not a vim-control file?
>
> regards,
> Christoph
>

IIUC, it means after reading the first file (if any) to be edited. See
":help startup" for details. If all your editfiles are set by your
session script, then of course there is no editfile before sourcing
your two startup scripts.

Using --cmd instead of -c (or -S which is equivalent to -c 'source
...' would allow you to define one or more ex-commands to be executed
even before reading the vimrc, but in this case it isn't what you
want.

Best regards,
Tony.

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment