view runtime/indent/vim.vim @ 33936:bdd408288d95 v9.0.2164

patch 9.0.2164: Vim9: can use type a func arg/return value Commit: https://github.com/vim/vim/commit/b077b58809f6bd1078f409829cc1964b8475f9fc Author: Ernie Rael <errael@raelity.com> Date: Thu Dec 14 20:11:44 2023 +0100 patch 9.0.2164: Vim9: can use type a func arg/return value Problem: Vim9: can use type a func arg/return value Solution: Check if using type as function argument or return value closes: #13675 Signed-off-by: Ernie Rael <errael@raelity.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 14 Dec 2023 20:15:10 +0100
parents 4027cefc2aab
children 5ac476543458
line wrap: on
line source

vim9script

# Vim indent file
# Language:	Vim script
# Maintainer:	The Vim Project <https://github.com/vim/vim>
# Last Change:	2023 Aug 10
# Former Maintainer:	Bram Moolenaar <Bram@vim.org>

# 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()
setlocal indentkeys+==endif,=enddef,=endfu,=endfor,=endwh,=endtry,=endclass,=endinterface,=endenum,=},=else,=cat,=finall,=END,0\\
execute('setlocal indentkeys+=0=\"\\\ ,0=#\\\ ')
setlocal indentkeys-=0#
setlocal indentkeys-=: