120630Re: Determining if Vim is running in text-console mode or X Windows
- Feb 1, 2011* Steve Laurie <mr.steven.laurie@...> [110201 09:17]:
> Hi Marvin,Ah, you want to distinguish between running in a terminal on a text
> 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.
console and running in a terminal emulator under X. Does this do what
if $DISPLAY == ""
let is_x_terminal = 0
let is_x_terminal = 1
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 >>