Is there a command I can put in the .vimrc to make gvim look like vim's setup in the terminal?

Same back ground, syntax highlighting, colors, and font.

To add to my question, is there a may for gvim to follow vim's vimrc? That is, there layouts and actions are identical?


Usually people want it the other way around, using (approximated) colors defined in a GVIM color scheme in the console, too.

It all depends on your colorscheme; it provides the attributes (like bold / italic), foreground and background colors for terminals, color terminals, and the GUI. Good color schemes provide similar definitions for all three. You can get your colorscheme's path from the :scriptnames output and check its contents.

For the font, just :set guifont=... in your ~/.gvimrc and choose the same value as you have in your terminal emulator.

  • Note that if you have a 256 colour enabled terminal, you might get away with the same colours in both vim and gvim. – Sardathrion - Reinstate Monica Apr 8 '13 at 8:12
  • @Ingo Karkat there is nothing related to colorscheme in the scriptnames output. How would it be labeled? – dustin Apr 8 '13 at 14:57
  • You recognize this by the /colors/*.vim in the path. If there's none, you're using the default colors, and you should then set one via :colorscheme. – Ingo Karkat Apr 8 '13 at 15:17

Options like this can be set into .vimrc file

colorscheme slate
set background=dark
syntax on
set ai

if has('gui_running')
    set guifont=Monospace\ 11

First a color scheme. here you can try with slate, ron, etc.
Second enable syntax highligh
Third set auto indent
And finally the font.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.