vim Configuring Vim Syntax Highlighting

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

Switch syntax highlighting on, when the terminal has colors

if &t_Co > 2 || has("gui_running")
    syntax on
end

Show trailing whitespace and tabs. Showing tabs can be especially useful when looking for errors in Makefiles.

set list listchars=tab:\|_,trail:.
highlight SpecialKey ctermfg=DarkGray


Got any vim Question?