mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 02:21:51 +00:00
Merge pull request #29357 from luukvbaal/statuscol
feat(column)!: rework 'statuscolumn' %r/l items
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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)} '
|
||||
|
||||
10
runtime/lua/vim/_meta/options.lua
generated
10
runtime/lua/vim/_meta/options.lua
generated
@@ -6376,8 +6376,7 @@ vim.go.sol = vim.go.startofline
|
||||
--- 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
|
||||
---
|
||||
@@ -6406,11 +6405,8 @@ vim.go.sol = vim.go.startofline
|
||||
--- 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)} '
|
||||
|
||||
Reference in New Issue
Block a user