120625Re: Determining if Vim is running in text-console mode or X Windows
- Feb 1, 2011On 02/02/11 01:51, Marvin Renich wrote:
> * Steve Laurie<mr.steven.laurie@...> [110201 06:57]:Hi Marvin,
>> Thanks for your help. unfortunately, none of these suggestions work.
> Hmm. You say in your original message that you have tried
> has("gui_running"). This works for me (and has for a long time).
> As a test, I put
> let my_has_gui_running = has("gui_running")
> early in my .vimrc. If I start vim from the command line and type
> :echo my_has_gui_running
> I get 0. If I do the same with gvim (or vim -g) I get 1. Using
> if has("gui_running")
> echo "has gui_running"
> echo "does not have gui_running"
> in .vimrc prints (to the terminal before setting up the vim screen) the
> correct string for both vim and gvim.
> I am using vim 7.2.445 from Debian squeeze.
On my system, "gui_running" only distinguishes between Vim and gvim.
I put let my_has_gui_running = has("gui_running") early in my ~/.vimrc
file and did :echo my_has_gui_running
In Vim run from the black and white tty text console, I get 0;
In Vim run insde of gnome-terminal, I also get 0;
In gvim, I get a 1
That's why it's not working. I'm trying to distinguish between tty text
mode and X mode.
Not between Vim and gvim.
the problem with this is if I use "gui_running"
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
- << Previous post in topic Next post in topic >>