On 9/27/09 4:31 PM, Harry Putnam wrote:
>
> Having trouble trying to use a single init (.vimrc) file for both vim
> and gvim.  I'd actually prefer just forget about gvim but some plugins
> seem to need it... at least one that I want to learn to use. (xpt).
>
> I pulled up lots of balderdash on google, and the 1 that actuall gave
> a code example of how to do it... does not work here.
>
> Found at: http://bugs.archlinux.org/task/10303
>
>    ; Only apply this in gvim
>    if has("gui-running")
>      set whatever
>    endif
>
>    ; Only apply this in non-gui vim
>    if !has("gui-running)
>      set whatever
>    endif
>
> One place I see a problem is if I set one of the color schemes
> available in gvim Edit/color scheme by typing
>
>     colors peachpuff
>
> At the bottom of .vimrc
>
> It has the desired effect in that gvim now opens with the peachpuff
> color scheme, but it wrecks my syntax colors in vim.  Appears to
> revert them to default or something.... at least the appearance is
> quite different than normal. (withouht `color peachpuff' in .vimrc)
>
> So attempting to use the code found on google:
>
>    " Only apply this in gvim
>    if has("gui-running")
>      colors peachpuff
>    endif
>
> That fixes it for vim, but now gvim fails to use the peachpuff color
> scheme.
>
> Is there some clear cut way to separate which editor load what from
> .vimrc?
>
>
> >
>

I am not sure what you are describing. I have

colors whatever set pretty high in my .vimrc and lower down I have
my gui block:

if has("gui_running")
     set guioptions+=acegtm
     set guioptions-=T
     set guifont=Menlo:12
     set lines=50
     set columns=100
     set mouse=a
     autocmd GUIEnter * set vb t_vb=
     colorscheme desert
endif

I get the colorscheme I want in both.

Bob

I get the


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to