From 7f658e6a19e43856ebc6aafe4f3a6e94cb765e73 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Wed, 19 Aug 2009 23:44:44 -0400 Subject: vim: Initial ftplugin and indent support Vim's indent support makes it easier to automatically indent puppet manifests. --- ext/vim/README | 3 +- ext/vim/ftplugin/puppet.vim | 94 +++++++++++++++++++++++++++++++++++++++++++++ ext/vim/indent/puppet.vim | 76 ++++++++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 ext/vim/ftplugin/puppet.vim create mode 100644 ext/vim/indent/puppet.vim (limited to 'ext') diff --git a/ext/vim/README b/ext/vim/README index 776bb1eb2..7fd2934fb 100644 --- a/ext/vim/README +++ b/ext/vim/README @@ -1,2 +1,3 @@ To install these files, copy them into ~/.vim, or the relevant -system-wide location. +system-wide location. To use the ftplugin and indenting, you may need +to enable them with "filetype plugin indent on" in your vimrc. diff --git a/ext/vim/ftplugin/puppet.vim b/ext/vim/ftplugin/puppet.vim new file mode 100644 index 000000000..b6491554b --- /dev/null +++ b/ext/vim/ftplugin/puppet.vim @@ -0,0 +1,94 @@ +" Vim filetype plugin +" Language: Puppet +" Maintainer: Todd Zullinger +" Last Change: 2009 Aug 19 +" vim: set sw=4 sts=4: + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +if !exists("no_plugin_maps") && !exists("no_puppet_maps") + if !hasmapto("AlignRange") + map = AlignRange + endif +endif + +noremap