Saturday, November 3, 2012

Re: Opening multiple files thru command line

On 01:07 Sat 03 Nov , analogsix wrote:
> I have a basic .vimrc and .gvimrc files that setup my options for my programming environment. I expect these files to get automatically sourced for all files in the arguments list of the vim -o[N] files command. Also, the .vimrc and .gvimrc files source a systemverilog.vim syntax file.
>
> However, when I open multiple files through the command line, my settings don't appear to be sourced in all windows. For example, one window (the active one) would have the :set nowrap option but the other two won't. Also, the other windows are not syntax color coded as I would expect.
>
> Can you assist?
>
> --
> 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

The .vimrc and .gvimrc files are sourced once on startup, rather than
for every file in args. My guess is that you are use setlocal rather
then set in your vimrc (or gvimrc file). This only makes sense if you
do that via an autocommand (like au BufAdd, au BufEnter, ...). You can
read about vim startup in the ":help startup", the third step (":help
vimrc") is to read the vimrc file. While windows are opened in the 11th
step.

Best regards,
Marcin

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