diff options
author | VVKot <volodymyr.kot.ua@gmail.com> | 2021-02-13 20:02:48 +0000 |
---|---|---|
committer | VVKot <volodymyr.kot.ua@gmail.com> | 2021-03-28 08:38:21 +0100 |
commit | 7fc58ec99a7546851d2a87b6548fd36d5d9c5abc (patch) | |
tree | e295de4e03277edc4b982a9bb420b7fa6c6b4a64 /runtime | |
parent | facb1d897e67f3ed71de658854d34cf48f4a3b98 (diff) | |
download | rneovim-7fc58ec99a7546851d2a87b6548fd36d5d9c5abc.tar.gz rneovim-7fc58ec99a7546851d2a87b6548fd36d5d9c5abc.tar.bz2 rneovim-7fc58ec99a7546851d2a87b6548fd36d5d9c5abc.zip |
vim-patch:8.1.0542: shiftwidth() does not take 'vartabstop' into account
Problem: shiftwidth() does not take 'vartabstop' into account.
Solution: Use the cursor position or a position explicitly passed.
Also make >> and << work better with 'vartabstop'. (Christian
Brabandt)
https://github.com/vim/vim/commit/f951416a8396a54bbbe21de1a8b16716428549f2
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/change.txt | 6 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index ed40642d0c..310d244fbc 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -445,6 +445,9 @@ SHIFTING LINES LEFT OR RIGHT *shift-left-right* *<* <{motion} Shift {motion} lines one 'shiftwidth' leftwards. + If the 'shiftwidth' option is set to zero, the amount + of indent is calculated at the first non-blank + character in the line. *<<* << Shift [count] lines one 'shiftwidth' leftwards. @@ -455,6 +458,9 @@ SHIFTING LINES LEFT OR RIGHT *shift-left-right* *>* >{motion} Shift {motion} lines one 'shiftwidth' rightwards. + If the 'shiftwidth' option is set to zero, the amount + of indent is calculated at the first non-blank + character in the line. *>>* >> Shift [count] lines one 'shiftwidth' rightwards. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 164c6fb8e0..2911224de5 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2308,7 +2308,6 @@ perleval({expr}) any evaluate |perl| expression pow({x}, {y}) Float {x} to the power of {y} prevnonblank({lnum}) Number line nr of non-blank line <= {lnum} printf({fmt}, {expr1}...) String format text -prompt_addtext({buf}, {expr}) none add text to a prompt buffer prompt_setcallback({buf}, {expr}) none set prompt callback function prompt_setinterrupt({buf}, {text}) none set prompt interrupt function prompt_setprompt({buf}, {text}) none set prompt text @@ -2393,7 +2392,7 @@ sha256({string}) String SHA256 checksum of {string} shellescape({string} [, {special}]) String escape {string} for use as shell command argument -shiftwidth() Number effective value of 'shiftwidth' +shiftwidth([{col}]) Number effective value of 'shiftwidth' sign_define({name} [, {dict}]) Number define or update a sign sign_getdefined([{name}]) List get a list of defined signs sign_getplaced([{expr} [, {dict}]]) @@ -7899,7 +7898,7 @@ shellescape({string} [, {special}]) *shellescape()* < See also |::S|. -shiftwidth() *shiftwidth()* +shiftwidth([{col}]) *shiftwidth()* Returns the effective value of 'shiftwidth'. This is the 'shiftwidth' value unless it is zero, in which case it is the 'tabstop' value. To be backwards compatible in indent |