X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=ext%2Fvim%2Fmcollective_ddl.snippets;fp=ext%2Fvim%2Fmcollective_ddl.snippets;h=8275fcb12d645b92af7eeb176c522355863856d7;hb=b87d2f4e68281062df1913440ca5753ae63314a9;hp=0000000000000000000000000000000000000000;hpb=ab0ea530b8ac956091f17b104ab2311336cfc250;p=packages%2Fprecise%2Fmcollective.git diff --git a/ext/vim/mcollective_ddl.snippets b/ext/vim/mcollective_ddl.snippets new file mode 100644 index 0000000..8275fcb --- /dev/null +++ b/ext/vim/mcollective_ddl.snippets @@ -0,0 +1,89 @@ +# Snippets for use with VIM and http://www.vim.org/scripts/script.php?script_id=2540 +# +# These snippets help you write Agent DDLs. Install the VIM Snippets system +# and copy this to your snippets directory. +# +# Create a file .vim/ftdetect/mcollective_ddl.vim with the following: +# +# au BufRead,BufNewFile *.ddl setfiletype mcollective_ddl +# +# Your file type should now be correctly set automatically and editing +# DDLs should be easier. +# +# Please contact R.I.Pienaar for additions and feedback, +snippet meta + metadata :name => "${1:`Filename('', 'name')`}", + :description => "${2:description}", + :author => "${3:`g:snips_author`}", + :license => "${4:license}", + :version => "${5:version}", + :url => "${6:homepage}", + :timeout => ${7:run timeout} + + ${8} +snippet discovery + discovery do + capabilities ${1:capability list} + end +snippet dataquery + dataquery :description => "${1:data query description}" do + ${2} + end +snippet action + action "${1:action name}", :description => "${2:action description}" do + ${3} + end +snippet input String + input :${1:input name}, + :prompt => "${2:prompt when asking for information}", + :description => "${3:description of the input}", + :type => :string, + :validation => '${4:^.+$}', + :optional => ${5:false}, + :maxlength => ${6:20} + + ${7} +snippet input List + input :${1:input name}, + :prompt => "${2:prompt when asking for information}", + :description => "${3:description of the input}", + :type => :list, + :optional => ${4:false}, + :list => [${5:list members}] + + ${6} +snippet input Numeric + input :${1:input name}, + :prompt => "${2:prompt when asking for information}", + :description => "${3:description of the input}", + :type => :number, + :optional => ${4:false} + + ${5} +snippet input Boolean + input :${1:input name}, + :prompt => "${2:prompt when asking for information}", + :description => "${3:description of the input}", + :type => :boolean, + :optional => ${4:false} + + ${5} +snippet output + output ${1:output name}, + :description => "${2:description of this output data}", + :display_as => "${3:what do display}", + :default => ${4:nil} + + ${5} +snippet display Always + display :always + + +snippet display Only OK results + display :ok + + +snippet display Only failed results + display :failed + +