summaryrefslogtreecommitdiffstats
path: root/runtime/indent/yaml.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:40:16 +0000
commit6af24b2457752c0d36aaf9f29f03d39afd09937f (patch)
tree2671b594908d1f971de6b2a2d473f97dfb7291d2 /runtime/indent/yaml.vim
parentReleasing progress-linux version 2:9.1.0016-1~progress7.99u1. (diff)
downloadvim-6af24b2457752c0d36aaf9f29f03d39afd09937f.tar.xz
vim-6af24b2457752c0d36aaf9f29f03d39afd09937f.zip
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--runtime/indent/yaml.vim7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/indent/yaml.vim b/runtime/indent/yaml.vim
index 93fd8ea..e5daf9f 100644
--- a/runtime/indent/yaml.vim
+++ b/runtime/indent/yaml.vim
@@ -3,6 +3,7 @@
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
" Last Updates: Lukas Reineke, "lacygoill"
" Last Change: 2022 Jun 17
+" 2024 Feb 29 disable mulitline indent by default (The Vim project)
" Only load this indent file when no other was loaded.
if exists('b:did_indent')
@@ -138,11 +139,13 @@ function GetYAMLIndent(lnum)
else
return indent(prevmapline)
endif
- elseif prevline =~# '^\s*- '
+ elseif get(g:, 'yaml_indent_multiline_scalar', 0) &&
+ \ prevline =~# '^\s*- '
" - List with
" multiline scalar
return previndent+2
- elseif prevline =~# s:mapkeyregex .. '\v\s*%(%(' .. s:c_ns_tag_property ..
+ elseif get(g:, 'yaml_indent_multiline_scalar', 0) &&
+ \ prevline =~# s:mapkeyregex .. '\v\s*%(%(' .. s:c_ns_tag_property ..
\ '\v|' .. s:c_ns_anchor_property ..
\ '\v|' .. s:block_scalar_header ..
\ '\v)%(\s+|\s*%(\#.*)?$))*'