On Thu, Mar 24, 2011 at 3:23 PM, statquant2 <[email protected]> wrote:
> Hello guys,
> I have some options in my vimrc that I only want to be executed when running
> gvim.
> I created a gvimrc and vimrc but it seems that when I run vim it is picking
> the gvimrc now.

Have you by any chance sourced the .gvimrc in .vimrc?

You can try to check where these options were last set, e.g:
:verbose set sw?
..will tell where the sw option was set
(:help :set-verbose)

Try running that on some of the options that have only been set in
.gvimrc and see what is reported.

>
> Is there a way to say to vim "please execute this only if gvim ?"
You can use :if has("gui_running") - not sure if that will work with
options in the rc file (because the GUI is not up yet). Else, have an
autocommand for GUIEnter to set the required options.. this is however
a workaround, .gvimrc should work in the first place.

>
> Cheers
> Colin
>
> --
> View this message in context: 
> http://vim.1045645.n5.nabble.com/vimrc-options-only-if-running-gvim-tp4262009p4262009.html
> Sent from the Vim - General mailing list archive at Nabble.com.
>
> --
> 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 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

Reply via email to