On 2009-05-20, Jinghui wrote:
> 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
-~----------~----~----~----~------~----~------~--~---