1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
let s:base = expand("<sfile>:h:h")
let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
let files = filter(globpath(&rtp, 'ftplugin/puppet.vim', 1, 1), Filter)
if len(files) > 0
exec 'source ' . files[0]
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1
" Vim filetype plugin
" Language: Puppet
" Maintainer: Tim Sharpe <tim@sharpe.id.au>
" URL: https://github.com/rodjek/vim-puppet
" Last Change: 2019-08-31
if (exists("b:did_ftplugin"))
finish
endif
let b:did_ftplugin = 1
setlocal tabstop=2
setlocal softtabstop=2
setlocal shiftwidth=2
setlocal expandtab
setlocal keywordprg=puppet\ describe\ --providers
setlocal iskeyword=:,@,48-57,_,192-255
setlocal comments=sr:/*,mb:*,ex:*/,b:#
setlocal commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
setlocal formatexpr=puppet#format#Format()
let b:undo_ftplugin = "
\ setlocal tabstop< tabstop< softtabstop< shiftwidth< expandtab<
\| setlocal keywordprg< iskeyword< comments< commentstring<
\| setlocal formatoptions< formatexpr<
\"
endif
|