diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2024-06-17 06:33:15 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-17 06:33:15 +0800 |
| commit | 7746c54e108ebfccde5fa8748deab31e996d412d (patch) | |
| tree | 8003189cf17f40eb2f299ed278f7426554341990 /runtime/doc | |
| parent | c3cb56d8ec2cab6842a8678c84d7fed4776822ca (diff) | |
| parent | ad70c9892d5b5ebcc106742386c99524f074bcea (diff) | |
| download | rneovim-7746c54e108ebfccde5fa8748deab31e996d412d.tar.gz rneovim-7746c54e108ebfccde5fa8748deab31e996d412d.tar.bz2 rneovim-7746c54e108ebfccde5fa8748deab31e996d412d.zip | |
Merge pull request #29357 from luukvbaal/statuscol
feat(column)!: rework 'statuscolumn' %r/l items
Diffstat (limited to 'runtime/doc')
| -rw-r--r-- | runtime/doc/news.txt | 5 | ||||
| -rw-r--r-- | runtime/doc/options.txt | 10 |
2 files changed, 7 insertions, 8 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 4addbf84c3..848a642774 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -62,7 +62,10 @@ LUA OPTIONS -• TODO +• The 'statuscolumn' `%l` item can now be used as a number column segment that + changes according to related options. It takes care of alignment, 'number', + 'relativenumber' and 'signcolumn' set to "number". The now redundant `%r` item + is no longer treated specially for 'statuscolumn'. PLUGINS diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index d0c2f20685..1b71050620 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5954,8 +5954,7 @@ A jump table for the options with a short description can be found at |Q_op|. 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 + %l line number column for currently drawn line %s sign column for currently drawn line %C fold column for currently drawn line @@ -5982,11 +5981,8 @@ A jump table for the options with a short description can be found at |Q_op|. handler should be written with this in mind. 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 number with bar separator and click handlers: + set statuscolumn=%@SignCb@%s%=%T%@NumCb@%l│%T " Line numbers in hexadecimal for non wrapped part of lines: let &stc='%=%{v:virtnum>0?"":printf("%x",v:lnum)} ' |