Sunday, March 1, 2015

Re: .gvimrc vs. .vimrc

On 2015-03-01 15:37, Bao Niu wrote:
> I have a quick question here:
> Is it safe to move everything from .vimrc to .gvimrc, or vise
> versa? Is there any particular command that can only be executed in
> one file but not the other? e.g. colorscheme?

Commands in the gvimrc won't get executed if you invoke (non-g)vim. I
seem to recall that direct gvim-related commands don't work if put in
just the vimrc. You can trigger them with an autocmd, so I've seen
folks do things like

autocmd GUIEnter * set guioptions-=t

in a single vimrc, so that when the GUI fires up, those commands get
executed. That allows you to have one vimrc and then set those
GUI-specific options when the GUI fires up.

That said, I just have a vimrc for most settings, and a gvimrc for my
few GUI-specific ones.

-tim




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