Mercurial > vim
comparison runtime/doc/eval.txt @ 15062:3a94f7918980 v8.1.0542
patch 8.1.0542: shiftwidth() does not take 'vartabstop' into account
commit https://github.com/vim/vim/commit/f951416a8396a54bbbe21de1a8b16716428549f2
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 22 03:08:29 2018 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 22 Nov 2018 03:15:10 +0100 |
parents | f8b0f1e42f2c |
children | bc1a8d21c811 |
comparison
equal
deleted
inserted
replaced
15061:0572862c3162 | 15062:3a94f7918980 |
---|---|
2306 pathshorten({expr}) String shorten directory names in a path | 2306 pathshorten({expr}) String shorten directory names in a path |
2307 perleval({expr}) any evaluate |Perl| expression | 2307 perleval({expr}) any evaluate |Perl| expression |
2308 pow({x}, {y}) Float {x} to the power of {y} | 2308 pow({x}, {y}) Float {x} to the power of {y} |
2309 prevnonblank({lnum}) Number line nr of non-blank line <= {lnum} | 2309 prevnonblank({lnum}) Number line nr of non-blank line <= {lnum} |
2310 printf({fmt}, {expr1}...) String format text | 2310 printf({fmt}, {expr1}...) String format text |
2311 prompt_addtext({buf}, {expr}) none add text to a prompt buffer | |
2312 prompt_setcallback({buf}, {expr}) none set prompt callback function | 2311 prompt_setcallback({buf}, {expr}) none set prompt callback function |
2313 prompt_setinterrupt({buf}, {text}) none set prompt interrupt function | 2312 prompt_setinterrupt({buf}, {text}) none set prompt interrupt function |
2314 prompt_setprompt({buf}, {text}) none set prompt text | 2313 prompt_setprompt({buf}, {text}) none set prompt text |
2315 pumvisible() Number whether popup menu is visible | 2314 pumvisible() Number whether popup menu is visible |
2316 pyeval({expr}) any evaluate |Python| expression | 2315 pyeval({expr}) any evaluate |Python| expression |
2384 setwinvar({nr}, {varname}, {val}) none set {varname} in window {nr} to {val} | 2383 setwinvar({nr}, {varname}, {val}) none set {varname} in window {nr} to {val} |
2385 sha256({string}) String SHA256 checksum of {string} | 2384 sha256({string}) String SHA256 checksum of {string} |
2386 shellescape({string} [, {special}]) | 2385 shellescape({string} [, {special}]) |
2387 String escape {string} for use as shell | 2386 String escape {string} for use as shell |
2388 command argument | 2387 command argument |
2389 shiftwidth([{list}]) Number effective value of 'shiftwidth' | 2388 shiftwidth([{col}]) Number effective value of 'shiftwidth' |
2390 simplify({filename}) String simplify filename as much as possible | 2389 simplify({filename}) String simplify filename as much as possible |
2391 sin({expr}) Float sine of {expr} | 2390 sin({expr}) Float sine of {expr} |
2392 sinh({expr}) Float hyperbolic sine of {expr} | 2391 sinh({expr}) Float hyperbolic sine of {expr} |
2393 sort({list} [, {func} [, {dict}]]) | 2392 sort({list} [, {func} [, {dict}]]) |
2394 List sort {list}, using {func} to compare | 2393 List sort {list}, using {func} to compare |
7637 cursor. Example of use with |system()|: > | 7636 cursor. Example of use with |system()|: > |
7638 :call system("chmod +w -- " . shellescape(expand("%"))) | 7637 :call system("chmod +w -- " . shellescape(expand("%"))) |
7639 < See also |::S|. | 7638 < See also |::S|. |
7640 | 7639 |
7641 | 7640 |
7642 shiftwidth([{list}]) *shiftwidth()* | 7641 shiftwidth([{col}]) *shiftwidth()* |
7643 Returns the effective value of 'shiftwidth'. This is the | 7642 Returns the effective value of 'shiftwidth'. This is the |
7644 'shiftwidth' value unless it is zero, in which case it is the | 7643 'shiftwidth' value unless it is zero, in which case it is the |
7645 'tabstop' value. This function was introduced with patch | 7644 'tabstop' value. This function was introduced with patch |
7646 7.3.694 in 2012, everybody should have it by now. | 7645 7.3.694 in 2012, everybody should have it by now (however it |
7647 | 7646 did not allow for the optional {col} argument until 8.1.542). |
7648 When there is one argument {list} this is used as position | 7647 |
7649 |List| for which to return the 'shiftwidth' value (actually | 7648 When there is one argument {col} this is used as column number |
7650 only the column number is relevant). This matters for the | 7649 for which to return the 'shiftwidth' value. This matters for the |
7651 'vartabstop' feature. For the {list} arguments see |cursor()| | 7650 'vartabstop' feature. If the 'vartabstop' setting is enabled and |
7652 function. If the 'vartabstop' setting is enabled and no | 7651 no {col} argument is given, column 1 will be assumed. |
7653 {list} argument is given, the current cursor position is | |
7654 taken into account. | |
7655 | 7652 |
7656 | 7653 |
7657 simplify({filename}) *simplify()* | 7654 simplify({filename}) *simplify()* |
7658 Simplify the file name as much as possible without changing | 7655 Simplify the file name as much as possible without changing |
7659 the meaning. Shortcuts (on MS-Windows) or symbolic links (on | 7656 the meaning. Shortcuts (on MS-Windows) or symbolic links (on |