0
0
mirror of https://github.com/vim/vim.git synced 2025-07-25 10:54:51 -04:00

runtime(vim): make &indentexpr available from the outside

closes: #14936

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt 2024-07-12 20:02:31 +02:00
parent 5247b0b92e
commit cb7928812e
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -3,7 +3,7 @@ vim9script
# Vim indent file # Vim indent file
# Language: Vim script # Language: Vim script
# Maintainer: The Vim Project <https://github.com/vim/vim> # Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Aug 10 # Last Change: 2024 Jul 12
# Former Maintainer: Bram Moolenaar <Bram@vim.org> # Former Maintainer: Bram Moolenaar <Bram@vim.org>
# Only load this indent file when no other was loaded. # Only load this indent file when no other was loaded.
@ -16,7 +16,9 @@ b:undo_indent = 'setlocal indentkeys< indentexpr<'
import autoload '../autoload/dist/vimindent.vim' import autoload '../autoload/dist/vimindent.vim'
setlocal indentexpr=vimindent.Expr() # export indentexpr as a global function, so it can be easily manipulated by plugins
g:VimIndent = vimindent.Expr
setlocal indentexpr=g:VimIndent()
setlocal indentkeys+==endif,=enddef,=endfu,=endfor,=endwh,=endtry,=endclass,=endinterface,=endenum,=},=else,=cat,=finall,=END,0\\ setlocal indentkeys+==endif,=enddef,=endfu,=endfor,=endwh,=endtry,=endclass,=endinterface,=endenum,=},=else,=cat,=finall,=END,0\\
execute('setlocal indentkeys+=0=\"\\\ ,0=#\\\ ') execute('setlocal indentkeys+=0=\"\\\ ,0=#\\\ ')
setlocal indentkeys-=0# setlocal indentkeys-=0#