0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

Added 'colorcolumn' option. Partly by Gregor Uhlenheuer.

This commit is contained in:
Bram Moolenaar
2010-07-14 19:53:30 +02:00
parent b28ebbca84
commit 1a38442dbc
13 changed files with 257 additions and 105 deletions

View File

@@ -2163,7 +2163,7 @@ A jump table for the options with a short description can be found at |Q_op|.
column. This option is useful for viewing the
differences between two versions of a file (see 'diff'); in diff mode,
inserted and deleted lines (though not characters within a line) are
taken into account.
taken into account.
*'cursorcolumn'* *'cuc'* *'nocursorcolumn'* *'nocuc'*
@@ -4547,6 +4547,25 @@ A jump table for the options with a short description can be found at |Q_op|.
< This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'colorcolumn'* *'cc'*
'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.
*'matchpairs'* *'mps'*
'matchpairs' 'mps' string (default "(:),{:},[:]")
local to buffer
@@ -6013,7 +6032,7 @@ A jump table for the options with a short description can be found at |Q_op|.
:set showbreak=>\
< Note the backslash to escape the trailing space. It's easier like
this: >
:let &showbreak = '+++ '
:let &showbreak = '+++ '
< Only printable single-cell characters are allowed, excluding <Tab> and
comma (in a future version the comma might be used to separate the
part that is shown at the end and at the start of a line).

View File

@@ -4212,6 +4212,8 @@ These are the default highlighting groups. These groups are used by the
'highlight' option default. Note that the highlighting depends on the value
of 'background'. You can see the current settings with the ":highlight"
command.
*hl-ColorColumn*
ColorColumn used for the columns set with 'colorcolumn'
*hl-Conceal*
Conceal placeholder characters substituted for concealed
text (see 'conceallevel')

View File

@@ -101,6 +101,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'buftype' options.txt /*'buftype'*
'casemap' options.txt /*'casemap'*
'cb' options.txt /*'cb'*
'cc' options.txt /*'cc'*
'ccv' options.txt /*'ccv'*
'cd' options.txt /*'cd'*
'cdpath' options.txt /*'cdpath'*
@@ -126,6 +127,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'cmp' options.txt /*'cmp'*
'cms' options.txt /*'cms'*
'co' options.txt /*'co'*
'colorcolumn' options.txt /*'colorcolumn'*
'columns' options.txt /*'columns'*
'com' options.txt /*'com'*
'comments' options.txt /*'comments'*

View File

@@ -1098,12 +1098,8 @@ Vim 7.3:
- Conceal feature: no update when moving to another window. (Dominique Pelle,
2010 Jul 5) Vince will look into it.
Patches to possibly include:
- Patch for vertical line at certain column position, 'guidecolumn' option.
(Pankaj Garg, 2009 Apr 14, aka Lone, Apr 15)
Update 2009 May 2, 'margincolumn'
- 'colorcolumn': make it local to window.
Alternative patch. (2010 Feb 2, Gregor Uhlenheuer, update 2010 Jul 12)
Fix by Lech Lorens, Apr 19
When there are multiple columns it makes sense to call it 'guidecolumn'
- Another patch for Javascript indenting. (Hari Kumar, 2010 Jul 11)
Needs a few tests.
- Add different highlighting for a fold line depending on the fold level.