When I put the following in .vimrc
colorscheme blue
It gives me a nice blue colorscheme in gvim. However, when I use vim, it is light blue instead. Is there a setting I can change so that gvim and vim look the same? If not, then is there a way I can set it up so that my gvim settings do not interfere with my vim settings?
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).
set your vim settings in the .vimrc
file, and set the gvim settings in the .gvimrc
settings file.
Just pick a different colorscheme in the .gvimrc
...
If you are using a modern terminal which support 88 or 256 colors(most of them do like gnome-terminal or roxterm(on linux) not sure about Mac or Windows) , you should check out this vim script CSApprox(http://www.vim.org/scripts/script.php?script_id=2390). This scripts make the color schemes made for gvim, work with terminal vim.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With