I have syntax highlighting on, but comments are set to dark blue. This hard for me to read against a black terminal. How do I change it so that the comments are colored green instead?
Listing available color schemesAfter typing the command, press “Tab”. This will open a list of all the available color schemes. If you keep pressing “Tab”, Vim will cycle through all of them.
VIM is an alternative and advanced version of VI editor that enables Syntax highlighting feature in VI. Syntax highlighting means it can show some parts of text in another fonts and colors. VIM doesn't show whole file but have some limitations in highlighting particular keywords or text matching a pattern in a file.
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.
Probably you just need to tell vim that you have a dark background:
:set background=dark
This should change the highlighting to something better readable.
Take a look at syncolor.vim
. You'll find it in /usr/share/vim/vim{version}/syntax/
.
Excerpt:
" There are two sets of defaults: for a dark and a light background. if &background == "dark" SynColor Comment term=bold cterm=NONE ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#80a0ff guibg=NONE SynColor Constant term=underline cterm=NONE ctermfg=Magenta ctermbg=NONE gui=NONE guifg=#ffa0a0 guibg=NONE SynColor Special term=bold cterm=NONE ctermfg=LightRed ctermbg=NONE gui=NONE guifg=Orange guibg=NONE
So the first SynColor
line looks of interest. I confess I don't know if you can override this, as opposed to changing this file.
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