view runtime/indent/vim.vim @ 30839:942f1b3bc694 v9.0.0754

patch 9.0.0754: 'indentexpr' overrules lisp indenting in one situation Commit: https://github.com/vim/vim/commit/a79b35b5781ae770334cec781d17fec3875f8108 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 15 10:49:36 2022 +0100 patch 9.0.0754: 'indentexpr' overrules lisp indenting in one situation Problem: 'indentexpr' overrules lisp indenting in one situation. Solution: Add "else" to keep the lisp indent. (issue https://github.com/vim/vim/issues/11327)
author Bram Moolenaar <Bram@vim.org>
date Sat, 15 Oct 2022 12:00:03 +0200
parents 1e91e26ceebf
children 3295247d97a5
line wrap: on
line source

vim9script

# Vim indent file
# Language:	Vim script
# Maintainer:	Bram Moolenaar <Bram@vim.org>
# Last Change:	2022 Sep 27

# Only load this indent file when no other was loaded.
if exists('b:did_indent')
    finish
endif

b:did_indent = true
b:undo_indent = 'setlocal indentkeys< indentexpr<'

import autoload '../autoload/dist/vimindent.vim'

setlocal indentexpr=vimindent.Expr(v:lnum)
setlocal indentkeys+==endif,=enddef,=endfu,=endfor,=endwh,=endtry,=},=else,=cat,=finall,=END,0\\
execute('setlocal indentkeys+=0=\"\\\ ,0=#\\\ ')
setlocal indentkeys-=0#
setlocal indentkeys-=: