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
Conditional statement in .vimrc to check if gui or terminal version
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Aaron Cruz  
View profile  
 More options Oct 15 2012, 11:32 am
From: Aaron Cruz <pferdeflei...@gmail.com>
Date: Mon, 15 Oct 2012 08:32:33 -0700 (PDT)
Local: Mon, Oct 15 2012 11:32 am
Subject: Conditional statement in .vimrc to check if gui or terminal version

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kyle Lippincott  
View profile  
 More options Oct 15 2012, 8:16 pm
From: Kyle Lippincott <spect...@pewpew.net>
Date: Mon, 15 Oct 2012 17:16:49 -0700
Local: Mon, Oct 15 2012 8:16 pm
Subject: Re: Conditional statement in .vimrc to check if gui or terminal version

On linux, I believe it's:
if has("gui_running")

I haven't tested if that works in macvim, but if it doesn't, then that
should be filed as a bug.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Derek Ashley Thomas  
View profile  
 More options Oct 16 2012, 1:37 am
From: Derek Ashley Thomas <derekatho...@gmail.com>
Date: Tue, 16 Oct 2012 14:37:24 +0900
Local: Tues, Oct 16 2012 1:37 am
Subject: Re: Conditional statement in .vimrc to check if gui or terminal version

Yep, it works on MacVim.

Also, is there a reason you don't put solarized settings in gvimrc? It
might simplify things for you.

On Tue, Oct 16, 2012 at 9:16 AM, Kyle Lippincott <spect...@pewpew.net>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aaron Cruz  
View profile  
 More options Oct 16 2012, 5:25 am
From: Aaron Cruz <pferdeflei...@gmail.com>
Date: Tue, 16 Oct 2012 02:25:21 -0700 (PDT)
Local: Tues, Oct 16 2012 5:25 am
Subject: Re: Conditional statement in .vimrc to check if gui or terminal version

This is working. Fantastic. Thanks.

I just found it here https://github.com/altercation/vim-colors-solarized#modify-vimrc and was coming back to report it but you all beat me to it :P


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aaron Cruz  
View profile  
 More options Oct 16 2012, 5:28 am
From: Aaron Cruz <pferdeflei...@gmail.com>
Date: Tue, 16 Oct 2012 02:28:44 -0700 (PDT)
Local: Tues, Oct 16 2012 5:28 am
Subject: Re: Conditional statement in .vimrc to check if gui or terminal version

> Also, is there a reason you don't put solarized settings in gvimrc? It might simplify things for you.

I didn't know this was a thing.
My only issue of separation is that solarized on terminal mode doesn't work for me in dark mode. It even won't switch to light mode from dark mode, just brown turns pink or something. It will start in light mode though and I do like light mode. All of the other settings work in both terminal and gui macvim.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dacresni  
View profile  
 More options Oct 16 2012, 11:25 am
From: dacresni <vivacar...@gmail.com>
Date: Tue, 16 Oct 2012 08:25:32 -0700 (PDT)
Local: Tues, Oct 16 2012 11:25 am
Subject: Re: Conditional statement in .vimrc to check if gui or terminal version

On Tuesday, October 16, 2012 4:28:44 AM UTC-5, Aaron Cruz wrote:
> > Also, is there a reason you don't put solarized settings in gvimrc? It might simplify things for you.

> I didn't know this was a thing.
> My only issue of separation is that solarized on terminal mode doesn't work for me in dark mode. It even won't switch to light mode from dark mode, just brown turns pink or something. It will start in light mode though and I do like light mode. All of the other settings work in both terminal and gui macvim.

I always forget about gvim

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »