Make Vim use terminal colors again


justice

I use Xfce4 and its terminal seems to have been upgraded and now supports 256 colors or true color (I'm not sure). These seem to be the relevant variables it exports:

COLORTERM=truecolor
TERM=xterm-256color

One of the unexpected changes it caused was that now Vim doesn't respect my palette anymore. Instead, it uses its own set of colors. And, bg=darkfor some reason it is set automatically .

The colors I'm most used to are the settings colorscheme peachpuff. But what I really want is for Vim to honor the 16 colors I've chosen to make up the palette in terminal use over the years.

I've searched for answers, but the "closest" answer I've found is actually the opposite of what I'm looking for . :)

Olivier Dulac

You can redefine TERM when invoking vim and run it's terminal with:

TERM=vt100 vim  # instead of simply: vim

(or even create an alias or function for this)

VAR=value a_command  #invokes a_command, + temporarily sets in its environment: VAR=value
                     #This assignement is not done on the rest of your shell.

Other popular TERM values: xterm or xterm-color

Related


Vim colors not working properly in terminal

Assis I'm using gnome-terminal and I'm using vim with a solarized color theme. When I open vim in terminal, it's illegible. However, when I open the file in gvim, the color scheme works fine. The Gnome Terminal's color scheme has also been tanned. One thing to

Vim colors not working properly in terminal

Assis I'm using gnome-terminal and I'm using vim with a solarized color theme. When I open vim in terminal, it's illegible. However, when I open the file in gvim, the color scheme works fine. The Gnome Terminal's color scheme has also been tanned. One thing to

In vim, terminal and iterm have different syntax colors

Yura I am new to vim setting T__T. On the left is the terminal display. On the right is the iterm2 display. How to change color in terminal like in iterm2 Thanks in advance. Paul Pei Some vim color schemes (including defaults) will use the terminal's palette a

In vim, terminal and iterm have different syntax colors

Yura I am new to vim setting T__T. On the left is the terminal display. On the right is the iterm2 display. How to change color in terminal like in iterm2 Thanks in advance. Paul Pei Some vim color schemes (including defaults) will use the terminal's palette a

How to use and configure terminal colors?

Owais Lone My terminal is all black and white. :P No color. Terminal output is highlighted in different colors to represent the data. Folders and files have separate colors as we do ls, but my terminal only shows one color. I'm on Ubuntu 10.10 with gnome-termi

The use of terminal colors does not stop

MatX I'm wondering if anyone knows why my terminal doesn't keep showing colored content, so after I use the command ls -l -a --color=alwaysI want it to stay colored so the next time I type ls -l -ait is colored. To be clear, I'm using Windows 10 and then using

The use of terminal colors does not stop

MatX I'm wondering if anyone knows why my terminal doesn't keep showing colored content, so after I use the command ls -l -a --color=alwaysI want it to stay colored so the next time I type ls -l -ait is colored. Just to be clear, I'm using Windows 10 and then

Use grep to keep vim colors

Mr. User I like the way vim highlights syslog output. However, I only want to open the latest output. I tried grep --color=always "$@" /var/log/syslog > /tmp/fileOUT vim /tmp/fileOUT But it gives bash color output like [033;m blah blah . If I don't include -

How to use 256 colors as background color in terminal

400 cats I know how to use 256 colors of text in terminal: printf "\033[38;5;196mhello\n" But for background colors, I seem to be limited to the basic 8 colors, namely: printf "\033[41mhello\n" How can I use 256 colors as background color? I mean, the termin

Vim: use different colors for words with patterns

username Being a hardware engineer, I use the embedded Ruby language to simplify the process of writing hardware Verilog/system Verilog code. In my *.sv and *.v files I have a lot of ERB variables starting with "__" (double underscore). For example <% __MEM_DE

Vim: use different colors for words with patterns

username Being a hardware engineer, I use the embedded Ruby language to simplify the process of writing hardware Verilog/system Verilog code. In my *.sv and *.v files I have a lot of ERB variables starting with "__" (double underscore). For example <% __MEM_DE

Different colors displayed in Vim via gnome terminal than gVim

username Why are the colors different when using the color scheme 'blackboard' through Vim in gnome-terminal and when using the same theme in gVim? That is, the background is black while on gVim it's blue, the function names are not displayed correctly, etc. O

How does vim colorscheme work with gnome terminal profile colors?

orange I'm confused about how vim's color scheme seems to work with my gnome terminal color settings. I have installed the colorscheme sampler pack : http://www.vi-improved.org/color_sampler_pack/ All of these are not the same for me and change as I change the

Different colors displayed in Vim via gnome terminal than gVim

username Why are the colors different when using the color scheme 'blackboard' through Vim in gnome-terminal and when using the same theme in gVim? That is, the background is black while on gVim it's blue, the function names are not displayed correctly, etc. O

How does vim colorscheme work with gnome terminal profile colors?

orange I'm confused about how vim's color scheme seems to work with my gnome terminal color settings. I have installed the colorscheme sampler pack : http://www.vi-improved.org/color_sampler_pack/ All of these are not the same for me and change as I change the

How to make Vim fill a terminal window

arachnid When running Vim in a terminal, the vim window doesn't fill the entire screen space, which can be very annoying when the terminal background color is fundamentally different from vim. Granted, someone might want to keep them in sync of some sort, but

How to make Vim fill a terminal window

arachnid When running Vim in a terminal, the vim window doesn't fill the entire screen space, which can be very annoying when the terminal background color is fundamentally different from vim. Granted, someone might want to keep them in sync of some sort, but

How to make Vim fill a terminal window

arachnid When running Vim in a terminal, the vim window doesn't fill the entire screen space, which can be very annoying when the terminal background color is fundamentally different from vim. Granted, someone might want to keep them in sync of some sort, but

How to make Vim fill a terminal window

arachnid When running Vim in a terminal, the vim window doesn't fill the entire screen space, which can be very annoying when the terminal background color is fundamentally different from vim. Granted, someone might want to keep them in sync of some sort, but

Use terminal to make large files

Avani Badheka For testing purposes, I want to make a big file that should contain unique words (strictly no repetition). Formats such as GB, TB, etc. can be used. Can I do this on the terminal? I am using Ubuntu 16.04 (Xenial Xerus). Jacob Flim Create an unlim

Use terminal to make large files

Avani Badheka For testing purposes, I want to make a big file that should contain unique words (strictly no repetition). Formats such as GB, TB, etc. can be used. Can I do this on the terminal? I am using Ubuntu 16.04 (Xenial Xerus). Jacob Flim Create an unlim

Make Gedit embedded terminal colors match global theme? (16.04)

mark In my 16.04 session, Gedit's embedded terminal doesn't follow the default ubuntu theme and doesn't seem to be configurable in any way. More precisely, it follows the username@hostname color of the ubuntu theme (some kind of bright green), but the backgrou

Make gcc pipe less to display colors correctly on terminal

Juniper I'm compiling a file with gcc (actually I'm making it, but that's ok) which sends some colored error messages to stderr. Therefore, I do: gcc a.c 2>&1 | less But what I get is lines like this: a.c: In function <E2><80><98>whatever(int)<E2><80><99>: a.

Make gcc pipe less to display colors correctly on terminal

Juniper I'm compiling a file with gcc (actually I'm making it, but that's ok) which sends some colored error messages to stderr. Therefore, I do: gcc a.c 2>&1 | less But what I get is lines like this: a.c: In function <E2><80><98>whatever(int)<E2><80><99>: a.

How to use terminal when coding in vim?

RaviRokkam: I have some php files open in Vim and at the same time I want to list the files in a specific folder in the same server in the terminal . what should I do? E.g: In terminal , I'm in devserver: ~$ Using Vim , I have several files open to continue wo

How to use terminal when coding in vim?

RaviRokkam: I have some php files open in Vim and at the same time I want to list the files in a specific folder in the same server in the terminal . what should I do? E.g: In terminal , I'm in devserver: ~$ Using Vim , I have several files open to continue wo