X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=blobdiff_plain;f=tools%2Fvim%2Fafter%2Fsyntax%2Fpuppet.vim;fp=tools%2Fvim%2Fafter%2Fsyntax%2Fpuppet.vim;h=20e60367603eb06d628c655cc989fbe07e93f75b;hp=0000000000000000000000000000000000000000;hb=66b30d19cf524bbae55a178445fbb6079ba07765;hpb=6710ef26e1c124e536aef0cecd742fe27586ea63 diff --git a/tools/vim/after/syntax/puppet.vim b/tools/vim/after/syntax/puppet.vim new file mode 100644 index 00000000..20e60367 --- /dev/null +++ b/tools/vim/after/syntax/puppet.vim @@ -0,0 +1,18 @@ +setlocal noexpandtab +setlocal shiftwidth=2 +setlocal tabstop=2 + +syn match puppetBadWhitespace /^ \+/ " leading spaces +syn match puppetBadWhitespace /\s\+$/ " trailing whitespace +syn match puppetBadWhitespace /[^\t]\zs\t\+/ " embedded tab +syn match puppetBadWhitespace /\t\zs \+/ " space(s) following tab +highlight puppetBadWhitespace ctermbg=red guibg=red + +" Spellcheck in comments. +setlocal spell +syn match puppetComment "\s*#.*$" contains=puppetTodo,@Spell +syn region puppetComment start="/\*" end="\*/" contains=puppetTodo,@Spell extend + +" Play nicely with ctags. +setlocal iskeyword=@,48-57,_,:,- " not strictly valid but required +setlocal tags=~/Projects/puppet/tags " you probably need to change this