comparison runtime/doc/indent.txt @ 29840:b15334beeaa4

Update runtime files Commit: https://github.com/vim/vim/commit/fd999452adaf529a30d78844b5fbee355943da29 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 24 18:30:14 2022 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Wed, 24 Aug 2022 19:45:05 +0200
parents f8116058ca76
children 1e91e26ceebf
comparison
equal deleted inserted replaced
29839:30481eb9c6ea 29840:b15334beeaa4
981 981
982 982
983 PYTHON *ft-python-indent* 983 PYTHON *ft-python-indent*
984 984
985 The amount of indent can be set for the following situations. The examples 985 The amount of indent can be set for the following situations. The examples
986 given are the defaults. Note that the variables are set to an expression, so 986 given are the defaults. Note that the dictionary values are set to an
987 that you can change the value of 'shiftwidth' later. 987 expression, so that you can change the value of 'shiftwidth' later.
988 988
989 Indent after an open paren: > 989 Indent after an open paren: >
990 let g:pyindent_open_paren = 'shiftwidth() * 2' 990 let g:python_indent.open_paren = 'shiftwidth() * 2'
991 Indent after a nested paren: > 991 Indent after a nested paren: >
992 let g:pyindent_nested_paren = 'shiftwidth()' 992 let g:python_indent.nested_paren = 'shiftwidth()'
993 Indent for a continuation line: > 993 Indent for a continuation line: >
994 let g:pyindent_continue = 'shiftwidth() * 2' 994 let g:python_indent.continue = 'shiftwidth() * 2'
995
996 By default, the closing paren on a multiline construct lines up under the first
997 non-whitespace character of the previous line.
998 If you prefer that it's lined up under the first character of the line that
999 starts the multiline construct, reset this key: >
1000 let g:python_indent.closed_paren_align_last_line = v:false
995 1001
996 The method uses |searchpair()| to look back for unclosed parentheses. This 1002 The method uses |searchpair()| to look back for unclosed parentheses. This
997 can sometimes be slow, thus it timeouts after 150 msec. If you notice the 1003 can sometimes be slow, thus it timeouts after 150 msec. If you notice the
998 indenting isn't correct, you can set a larger timeout in msec: > 1004 indenting isn't correct, you can set a larger timeout in msec: >
999 let g:pyindent_searchpair_timeout = 500 1005 let g:python_indent.searchpair_timeout = 500
1000 1006
1001 If looking back for unclosed parenthesis is still too slow, especially during 1007 If looking back for unclosed parenthesis is still too slow, especially during
1002 a copy-paste operation, or if you don't need indenting inside multi-line 1008 a copy-paste operation, or if you don't need indenting inside multi-line
1003 parentheses, you can completely disable this feature: > 1009 parentheses, you can completely disable this feature: >
1004 let g:pyindent_disable_parentheses_indenting = 1 1010 let g:python_indent.disable_parentheses_indenting = 1
1011
1012 For backward compatibility, these variables are also supported: >
1013 g:pyindent_open_paren
1014 g:pyindent_nested_paren
1015 g:pyindent_continue
1016 g:pyindent_searchpair_timeout
1017 g:pyindent_disable_parentheses_indenting
1005 1018
1006 1019
1007 R *ft-r-indent* 1020 R *ft-r-indent*
1008 1021
1009 Function arguments are aligned if they span for multiple lines. If you prefer 1022 Function arguments are aligned if they span for multiple lines. If you prefer