How can I get VIM editor color coded by MIME extensions?

89 Views Asked by At

I should point out that I already have it color coded by way of konsole terminal emulator's built in profiles system, and I need that for the dark effects I have, too...

But I am coming to realize that I prefer staying in the terminal editor a lot more often than I used to. The only thing that I miss and can't really function without while doing certain types of file editing is the ability to have my code color coded specifically so that I can tell if the syntax looks right or not. My eyes hurt too much without it.

I'd be interested in the most simple and the most complex ways of intricate config.

1

There are 1 best solutions below

0
On

Your question is very vague, but here are some settings for your .vimrc (or _vimrc on Windows) :

  • syntax on enables syntax highlighting
  • set background=dark, or set background=light if your terminal has a bright background

Your terminal might set TERM to conservative values. For example, try out TERM=xterm-256color. If your terminal has true color support, you can allow Vim to use GUI colors in the terminal with set termguicolors. Beware though that both of these have their downsides.