Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Conditional statement in .vimrc to check if gui or terminal version

Received: by 10.224.70.131 with SMTP id d3mr8418401qaj.0.1350346165253;
        Mon, 15 Oct 2012 17:09:25 -0700 (PDT)
X-BeenThere: vim_mac@googlegroups.com
Received: by 10.224.210.4 with SMTP id gi4ls11025263qab.2.gmail; Mon, 15 Oct
 2012 17:09:23 -0700 (PDT)
Received: by 10.224.220.12 with SMTP id hw12mr8405845qab.8.1350346163357;
        Mon, 15 Oct 2012 17:09:23 -0700 (PDT)
Received: by 10.224.28.72 with SMTP id l8msqac;
        Mon, 15 Oct 2012 08:32:35 -0700 (PDT)
Received: by 10.236.150.16 with SMTP id y16mr1460510yhj.8.1350315154727;
        Mon, 15 Oct 2012 08:32:34 -0700 (PDT)
Date: Mon, 15 Oct 2012 08:32:33 -0700 (PDT)
From: Aaron Cruz <pferdeflei...@gmail.com>
To: vim_mac@googlegroups.com
Message-Id: <7b98d5b7-43b1-4922-9234-a2b8c71f9802@googlegroups.com>
Subject: Conditional statement in .vimrc to check if gui or terminal version
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_105_19531842.1350315153810"

------=_Part_105_19531842.1350315153810
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

I am having problems with the solarized dark colorscheme showing up correctly on my terminal version of MacVim because I don't want to use the solarized **terminal** theme as well.
I just found the `if has("gui_macvim")` statement but it is getting a true also for my terminal version of MacVim.
I would be happy solving this with a conditional statement in my .vimrc that looked something like this.
<code>
if has("terminal_macvim")
  set background=light
endif
</code>
(This would also have to not break linux vim builds)
Does such a thing exist?
Can anyone think of another way of solving this?
The use case is that I tend to use the terminal version for one off scripts and configs and the GUI version for projects that have some sort of file tree.
--
Thanks all,
aaron
------=_Part_105_19531842.1350315153810--