> On Friday 23 July 2010 10:23:55 Frans Grotepass wrote:> Hi all,
>
> > I enabled right margin highlighting using
>
> > :match rightMargin /.\%>100v/
> > :highlight rightMargin guifg=black
> > :highlight rightMargin guibg=pink
>
> > When I open a second window using split or vsplit, then the margin
> > highlighting is not active. How can I enable the margin highlighting?
>
> Found it...
> autocmd WinEnter * if !exists('w:created') | :match rightMargin /.\%>100v/ | endif
JFYI, Vim73 has 'colorcolumn'
'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.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment