diff options
author | Shadman <shadmansaleh3@gmail.com> | 2021-05-15 23:10:41 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-15 13:10:41 -0400 |
commit | d67dcaba02d76fe92ba818dde7b672fe6956a100 (patch) | |
tree | e03e0cc41d3744fdc57c20393508bf18a472b0b6 /runtime/doc | |
parent | 0cd14303162df99bbd796002a44588aface2bad8 (diff) | |
download | rneovim-d67dcaba02d76fe92ba818dde7b672fe6956a100.tar.gz rneovim-d67dcaba02d76fe92ba818dde7b672fe6956a100.tar.bz2 rneovim-d67dcaba02d76fe92ba818dde7b672fe6956a100.zip |
vim-patch:8.2.2854: custom statusline cannot contain % items (#14558)
Problem: Custom statusline cannot contain % items.
Solution: Add "%{% expr %}". (closes vim/vim#8190)
https://github.com/vim/vim/commit/30e3de21fc36153c5f7c9cf9db90bcc60dd67fb9
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/options.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 2527a91cc8..4a6ae0245b 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5923,6 +5923,18 @@ A jump table for the options with a short description can be found at |Q_op|. Note that there is no '%' before the closing '}'. The expression cannot contain a '}' character, call a function to work around that. See |stl-%{| below. + {% - This is almost same as { except the result of the expression is + re-evaluated as a statusline format string. Thus if the + return value of expr contains % items they will get expanded. + The expression can contain the } character, the end of + expression is denoted by %}. + The For example: > + func! Stl_filename() abort + return "%t" + endfunc +< `stl=%{Stl_filename()}` results in `"%t"` + `stl=%{%Stl_filename()%}` results in `"Name of current file"` + } - End of `{%` expression ( - Start of item group. Can be used for setting the width and alignment of a section. Must be followed by %) somewhere. ) - End of item group. No width fields allowed. |