Vim 7.3 is not yet in the Ubuntu repositories officially, but a PPM is available here:
http://askubuntu.com/questions/7283/where-can-i-find-vim-7-3
Once installed, use vim help to get details about colorcolumn.
:help colorcolumn
This will show you:
'colorcolumn' 'cc' string (default "")
local to window
{not in Vi}
{not available when compiled without the |+syntax|
feature}
'colorcolumn' is a comma separated list of screen columns that are
highlighted with ColorColumn |hl-ColorColumn|. Useful to align
text. Will make screen redrawing slower.
The screen column can be an absolute number, or a number preceded with
'+' or '-', which is added to or subtracted from 'textwidth'.
:set cc=+1 " highlight column after 'textwidth'
:set cc=+1,+2,+3 " highlight three columns after 'textwidth'
:hi ColorColumn ctermbg=lightgrey guibg=lightgrey
When 'textwidth' is zero then the items with '-' and '+' are not used.
A maximum of 256 columns are highlighted.
In practice you only need to :set cc=n, as there are default colors.
No comments:
Post a Comment