As well as John's suggestion of using .gvimrc
, there are a couple of other interesting alternatives:
If your command-line vim is compiled with +gui
(:echo has("gui")
)* and you have a 256 colour capable terminal, you can use the CSApprox plugin to convert the GUI colour scheme into a matching command line one.
If your command-line vim doesn't have +gui
, you could try (I haven't used this one) the guicolorscheme plugin. The guicolorscheme plugin parses the colour scheme file, so it isn't as robust as the CSApprox one (it almost certainly won't work with my colour scheme for example.
There's a lot more information on both of those methods here and here.
* Regarding has("gui"):
If you're not interested in +gui
, stop reading now!
Personally, I'd recommend this as it simplifies things a bit - you get the opportunity to type :gui
if you want to change from terminal to GUI and as you inevitably have +X11
and +xterm_clipboard
as well, you can copy to the X clipboards from console vim. If your vim doesn't have +gui
, the easiest way to fix it is to create a link in your personal bin
directory to the GUI executable:
ln `which gvim` ~/bin/vim
GVim will quite happily work as a console vim if the executable name is vim
. A "default" build from the vim source with GUI enabled will create one executable (vim
) and lots of links to that executable like gvim
, gview
, view
, vimdiff
etc. Most Linux distributions seem to compile them separately though, in order to minimise requirements of the basic Vim (so you can use vim without installing X). As such, I tend to recompile and install in /usr/local with the features I want as I always have X installed (it doesn't have to be running, just installed).