diff options
Diffstat (limited to 'runtime/doc/options.txt')
-rw-r--r-- | runtime/doc/options.txt | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index ee6c14e73f..aa2f528d1b 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -6001,6 +6001,52 @@ A jump table for the options with a short description can be found at |Q_op|. In case of buffer changing commands the cursor is placed at the column where it was the last time the buffer was edited. + *'statuscolumn'* *'stc'* +'statuscolumn' 'stc' string (default: empty) + local to window + EXPERIMENTAL + When non-empty, this option determines the content of the area to the + side of a window, normally containing the fold, sign and number columns. + The format of this option is like that of 'statusline'. + + Some of the items from the 'statusline' format are different for + 'statuscolumn': + + %l line number of currently drawn line + %r relative line number of currently drawn line + %s sign column for currently drawn line + %C fold column for currently drawn line + + To draw the sign and fold columns, they must be included in + 'statuscolumn'. + + The |v:lnum| variable holds the line number to be drawn. + The |v:relnum| variable holds the relative line number to be drawn. + The |v:wrap| variable holds true for the wrapped part of a line. + + Examples: >vim + " Relative number with bar separator and click handlers: + :set statuscolumn=%@SignCb@%s%=%T%@NumCb@%r│%T + + " Right aligned relative cursor line number: + :let &stc='%=%{v:relnum?v:relnum:v:lnum} ' + + " Line numbers in hexadecimal for non wrapped part of lines: + :let &stc='%=%{v:wrap?"":printf("%x",v:lnum)} ' + + " Human readable line numbers with thousands separator: + :let &stc='%{substitute(v:lnum,"\\d\\zs\\ze\\' + . '%(\\d\\d\\d\\)\\+$",",","g")}' + + " Both relative and absolute line numbers with different + " highlighting for odd and even relative numbers: + :let &stc='%#NonText#%{&nu?v:lnum:""}' . + '%=%{&rnu&&(v:lnum%2)?"\ ".v:relnum:""}' . + '%#LineNr#%{&rnu&&!(v:lnum%2)?"\ ".v:relnum:""}' + +< WARNING: this expression is evaluated for each screen line so defining + an expensive expression can negatively affect render performance. + *'statusline'* *'stl'* *E540* *E542* 'statusline' 'stl' string (default empty) global or local to window |global-local| |