Just how do I enable full-color assistance in Vim?

I have a wonderful Vim colorscheme (xoria256) and also it looks great in GVim, yet when I make use of regular vim in Terminal, the colorscheme is just partly sustained-- as an example, the default semi-transparent aubergine history shade is made use of. Just how do I make Terminal consistently provide my Vim colorscheme?

2019-05-06 02:24:48
Source Share
Answers: 5

Well, you can constantly set up Gvim to make it resemble Vim. You simply need to create a ~/. gvimrc documents and also paste in it these customisation methods :

set guioptions-=r  " no scrollbar on the right
set guioptions-=l  " no scrollbar on the left
set guioptions-=m  " no menu
set guioptions-=T  " no toolbar

I do not assume this addresses your trouble, yet that recognizes ; -)

2019-12-04 09:42:14

Just include the line listed below right into your $HOME/.bashrc (ideally in the last line of the documents) :

export TERM="xterm-256color"

And wait. After, reactivate your gnome - terminal. This adjustment will certainly be readily available not just in vim, but also for all your terminal applications.

To examine if it functions, run this little script :

#!/usr/bin/env python
# Copyright (C) 2006 by Johannes Zellner, <[email protected]>
# modified by [email protected] to fit my output needs
# modified by [email protected] to fit my output needs

import sys
import os

def echo(msg):
    os.system('echo -n "' + str(msg) + '"')

def out(n):
    os.system("tput setab " + str(n) + "; echo -n " + ("\"% 4d\"" % n))
    os.system("tput setab 0")

# normal colors 1 - 16
os.system("tput setaf 16")
for n in range(8):
for n in range(8, 16):


while y < 231:
    for z in range(0,6):
        y += 1



for n in range(232, 256):
    if n == 237 or n == 243 or n == 249:

os.system("tput setaf 7")
os.system("tput setab 0")

Thereafter, you will certainly see something like the following (relies on your gnome - terminal motif) :

2019-12-04 09:36:02

I made a different account for Vim which makes use of a strong, nontransparent shade behind-the-scenes. I simply by hand switch over to it whenever I make use of Vim. Not exactly sure whether there's a far better method. I would certainly such as to assume so.

2019-05-09 06:12:59

GNOME Terminal sustains 256 colors, yet does not market its assistance. You can bypass vim's autodetection by placing the following:

if $COLORTERM == 'gnome-terminal'
  set t_Co=256

in your ~/. vimrc.

Keep in mind : if you make use of GNU screen, it will gladly consume those 256 - shade codes and also transform them to standard 16 colors. A far better solution is to transform TERM to xterm - 256color prior to releasing screen/vim.

Update for 2017 : if you have a completely current Vim (7.4.1799 or more recent), and also a completely innovative incurable emulator (xterm, or gnome - incurable based upon a completely current variation of VTE), you can :set termguicolors and also incurable vim will certainly make use of complete 24 - little bit colors as specified by your vim motif making use of highlight guifg=#rrggbb guibg=#rrggbb.

2019-05-09 02:16:08

An extra basic remedy is to install the term type "xterm - 256color". In 10.04 I assume it's mounted by default. Formerly you required to install "ncurses - term" to get it.

After that set the term type in.bashrc with something like the adhering to :

if [ -n "$DISPLAY" -a "$TERM" == "xterm" ]; then
    export TERM=xterm-256color

If you would certainly favor to just have the 256 colour capacity for sure programs (probably it perplexes a few other) make use of rather :

TERM=xterm-256color myprogram

and also probably set that as a pen name for the program.

After that examine your incurable colour capacities with :

$ tput colors

You still might require the vim setup over to have vim acknowledge it. The majority of applications will certainly acknowledge the 256 colours instantly (if they can utilize them).

Emacs additionally has colour motifs that are better with 256 colours. To examine if it 256 - colour qualified run :

M-x list-colors-display

256colors.pl is Perl manuscript that will certainly present all the colours in your terminal.

2019-05-08 19:28:45