diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-08-25 00:49:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 00:49:33 +0200 |
commit | d3cd79709b6491a5806c67ea52c19f244164954e (patch) | |
tree | 1b696646bf21a68d458038df567d9a2d9dbef349 /runtime/doc/indent.txt | |
parent | 6b9ff5491d4a15c7ec92d70a769b3cc35ea06da9 (diff) | |
download | rneovim-d3cd79709b6491a5806c67ea52c19f244164954e.tar.gz rneovim-d3cd79709b6491a5806c67ea52c19f244164954e.tar.bz2 rneovim-d3cd79709b6491a5806c67ea52c19f244164954e.zip |
vim-patch:fd999452adaf (#19929)
Update runtime files
https://github.com/vim/vim/commit/fd999452adaf529a30d78844b5fbee355943da29
Diffstat (limited to 'runtime/doc/indent.txt')
-rw-r--r-- | runtime/doc/indent.txt | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index 1a1d8e30b0..c5411b5f16 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -979,25 +979,38 @@ indentation: > PYTHON *ft-python-indent* The amount of indent can be set for the following situations. The examples -given are the defaults. Note that the variables are set to an expression, so -that you can change the value of 'shiftwidth' later. +given are the defaults. Note that the dictionary values are set to an +expression, so that you can change the value of 'shiftwidth' later. Indent after an open paren: > - let g:pyindent_open_paren = 'shiftwidth() * 2' + let g:python_indent.open_paren = 'shiftwidth() * 2' Indent after a nested paren: > - let g:pyindent_nested_paren = 'shiftwidth()' + let g:python_indent.nested_paren = 'shiftwidth()' Indent for a continuation line: > - let g:pyindent_continue = 'shiftwidth() * 2' + let g:python_indent.continue = 'shiftwidth() * 2' + +By default, the closing paren on a multiline construct lines up under the first +non-whitespace character of the previous line. +If you prefer that it's lined up under the first character of the line that +starts the multiline construct, reset this key: > + let g:python_indent.closed_paren_align_last_line = v:false The method uses |searchpair()| to look back for unclosed parentheses. This can sometimes be slow, thus it timeouts after 150 msec. If you notice the indenting isn't correct, you can set a larger timeout in msec: > - let g:pyindent_searchpair_timeout = 500 + let g:python_indent.searchpair_timeout = 500 If looking back for unclosed parenthesis is still too slow, especially during a copy-paste operation, or if you don't need indenting inside multi-line parentheses, you can completely disable this feature: > - let g:pyindent_disable_parentheses_indenting = 1 + let g:python_indent.disable_parentheses_indenting = 1 + +For backward compatibility, these variables are also supported: > + g:pyindent_open_paren + g:pyindent_nested_paren + g:pyindent_continue + g:pyindent_searchpair_timeout + g:pyindent_disable_parentheses_indenting R *ft-r-indent* |