I'd like to change the default font color for comments, which is dark blue to slightly yellow color. It is difficult to read on the black background. I'm using xfce4-terminal, not gvim with GUI.
How do I change only this one color?
So far, I have changed the settings in my ~/.profile
file according to "256 colors in vim" using:
if [ -e /usr/share/terminfo/x/xterm-256color ]; then export TERM='xterm-256color' else export TERM='xterm-color' fi
and
set t_Co=256
in ~/.vimrc
.
You can change color schemes at anytime in vi by typing colorscheme followed by a space and the name of the color scheme. For more color schemes, you can browse this library on the vim website. You can enable or disable colors by simply typing "syntax on" or "syntax off" in vi.
Click on the System menu at the upper left corner of the PuTTY window. Select Change Settings > Window > Colours. In the box that says "Select a colour to adjust", choose ANSI Blue and click the Modify Button.
After opening login.sh file in vim editor, press ESC key and type ':syntax on' to enable syntax highlighting. The file will look like the following image if syntax highlighting is on. Press ESC key and type, “syntax off” to disable syntax highlighting.
Vim color schemes are stored in vim directory named /usr/share/vim/vim80/colors/ but vim80 can be different according to vim version.
Most well-behaving colorschemes will respect the background
setting.
set background=dark
would change the color of comments from dark blue to light blue, when using the default colorscheme.
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