neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 182a8f08b2e11de2dce1b27b7b899229a60030c1
parent ba1d50fdc37ffd5850f4ee9662d8576b78663d4a
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Fri, 16 Jan 2026 07:25:41 +0800

vim-patch:af973d4: runtime(yaml): fix indentation script

Problem:  The indentation of Ansible Playbooks gets messed up after
          gg=G (after 9179ddc0608813e)
Solution: Remove one shiftwidth() that seems to be misplaced.

closes: vim/vim#19180

https://github.com/vim/vim/commit/af973d401803fb1110f699ced6df45b74fcaed2b

Co-authored-by: Bjoern Foersterling <bjoern.foersterling@gmail.com>

Diffstat:
Mruntime/indent/yaml.vim | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/runtime/indent/yaml.vim b/runtime/indent/yaml.vim @@ -6,6 +6,7 @@ " 2024 Feb 29 by Vim project: disable mulitline indent by default " 2024 Aug 14 by Vim project: fix re-indenting when commenting out lines " 2026 Jan 08 by Vim project: fix object indentation in array +" 2026 Jan 15 by Vim project: fix double shiftwidth from previous change " Only load this indent file when no other was loaded. if exists('b:did_indent') @@ -146,7 +147,7 @@ function GetYAMLIndent(lnum) " Previous mapping key is in a list item (- key:) " The key effectively starts at indent + 2 (after "- ") " Content under it should be indented relative to the key position - return indent(prevmapline) + 2 + shiftwidth() + return indent(prevmapline) + 2 else return indent(prevmapline) endif