codekingpro/portable-devtools
114k
1" Vim support file to switch on loading indent files for file types2"3" Maintainer: The Vim Project <https://github.com/vim/vim>4" Last Change: 2023 Aug 105" Former Maintainer: Bram Moolenaar <Bram@vim.org>6 7if exists("did_indent_on")8 finish9endif10let did_indent_on = 111 12augroup filetypeindent13 au FileType * call s:LoadIndent()14augroup END15 16def s:LoadIndent()17 if exists("b:undo_indent")18 legacy exe b:undo_indent19 unlet! b:undo_indent b:did_indent20 endif21 var s = expand("<amatch>")22 if s != ""23 if exists("b:did_indent")24 unlet b:did_indent25 endif26 27 # When there is a dot it is used to separate filetype names. Thus for28 # "aaa.bbb" load "indent/aaa.vim" and then "indent/bbb.vim".29 for name in split(s, '\.')30 exe 'runtime! indent/' .. name .. '.vim'31 endfor32 endif33enddef34 