]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - tools/vim/after/syntax/puppet.vim
add tools directory
[dsa-puppet.git] / tools / vim / after / syntax / puppet.vim
diff --git a/tools/vim/after/syntax/puppet.vim b/tools/vim/after/syntax/puppet.vim
new file mode 100644 (file)
index 0000000..20e6036
--- /dev/null
@@ -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