Discussion:
run vim in the background
Jinghui
2009-05-20 15:38:23 UTC
Permalink
Hi,

I am using gvim on the Linux. I would like to know how to set .vimrc
file to let gvim run in the background automatically.

i.e. after I type in 'gvim file_name' and press enter, the gvim window
pops up as well as the next command prompt shows up. I don't what to
type in '&' at the end of file_name for running gvim in the background
or must close the gvim window for typing in the other commands.


Thanks
Jinghui

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
Gary Johnson
2009-05-20 16:08:54 UTC
Permalink
Post by Jinghui
Hi,
I am using gvim on the Linux. I would like to know how to set .vimrc
file to let gvim run in the background automatically.
i.e. after I type in 'gvim file_name' and press enter, the gvim window
pops up as well as the next command prompt shows up. I don't what to
type in '&' at the end of file_name for running gvim in the background
or must close the gvim window for typing in the other commands.
By default, gvim _does_ run in the background automatically. I can
think of two explanations for why yours does not do this. The first
is that on your system, "gvim" is an alias for "gvim -f". You can
execute

alias gvim

at the shell prompt to see if you have an alias for gvim. The
second possibility is that there is a system vimrc or gvimrc file in
which the 'f' flag has been added to 'guioptions'. Executing

gvim --version

at the shell prompt will show where gvim looks for the system vimrc
and gvimrc. They are probably $VIM/vimrc and $VIM/gvimrc. In that
case, open those files (e.g., within gvim, execute ":e $VIM/vimrc")
and search for "guioptions" or the short form, "go".

You could also execute the following from within gvim:

:verbose set guioptions?

That would show you the current value of 'guioptions' as well as the
name of the last script in which it was set, if it was set in a
script.

See

:help -f

as a starting point for more about this.

HTH,
Gary



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
Ken Bloom
2009-05-20 16:20:28 UTC
Permalink
Post by Jinghui
Hi,
I am using gvim on the Linux. I would like to know how to set .vimrc
file to let gvim run in the background automatically.
i.e. after I type in 'gvim file_name' and press enter, the gvim window
pops up as well as the next command prompt shows up. I don't what to
type in '&' at the end of file_name for running gvim in the background
or must close the gvim window for typing in the other commands.
I thought that was the default, and you had to do gvim -f or
gvim --nofork if you wanted to prevent getting another shell prompt. I
guess you should check to make sure you don't have any shell aliases
getting in the way.
--
Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/


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