Using vim in default ubuntu is quite uninteresting. White text on a dark background or otherwise. No colours, no keyword highlighting and every letter in the same colour. There are several colorschemes in the internet, which can be used and adapted for your own wishes. Put them into $VIMRUNTIME/colors (call :echo $VIMTUNTIME to get the environment variable). Such files should always start with something like:
set background=dark " or 'light'
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "foobar"
In the next lines, Vim uses the highlight command (abbr. hi) to set colors for specific textareas. Vim has already plugins to detect areas itself. For example <!– comments in HTML –> are accessible with the keyword htmlComment. To change the color of a html comment, we will use this command:
hi htmlComment term=bold guifg=#00CC00 guibg=#FFCC33 gui=bold
Of course, gui-anything means it’s only available in gui-mode. “fg” means foreground and “bg” background. See “:help hi” to get more information. I would really recommend to find good color schemes and adapt it for your own purposes. See “:help usr_06″ for general information about syntax highlightning.
Recent Comments