Skip to content

Commit dec4556

Browse files
committed
Merge pull request #278 from nmesstorff/master
Add classheader and defheader puppet snippet
2 parents f6165ba + 79f84fb commit dec4556

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

snippets/puppet.snippets

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,87 @@
33
# Please contact R.I.Pienaar <[email protected]> for additions and feedback,
44
# see it in action @ http://www.devco.net/archives/2009/09/22/vim_and_puppet.php
55

6+
# Header to match http://docs.puppetlabs.com/guides/style_guide.html#puppet-doc
7+
snippet classheader
8+
# == Class: ${1:`vim_snippets#Filename(expand('%:p:s?.*modules/??:h:h'), 'name')`}
9+
#
10+
# ${2:Full description of class $1 here}
11+
#
12+
# === Parameters
13+
#
14+
# Document parameters here.
15+
#
16+
# [*parameter1*]
17+
# Explanation of what this parameter affects and what it defaults to.
18+
# e.g. "Specify one or more upstream ntp servers as an array."
19+
#
20+
# === Variables
21+
#
22+
# Here you should define a list of variables that this module would require.
23+
#
24+
# [*variable1*]
25+
# Explanation of how this variable affects the funtion of this class and
26+
# if it has a default. e.g. "The parameter enc_ntp_servers must be set by the
27+
# External Node Classifier as a comma separated list of hostnames."
28+
#
29+
# === Examples
30+
#
31+
# class { '$1':
32+
# parameter1 => [ 'just', 'an', 'example', ]
33+
# }
34+
#
35+
# === Authors
36+
#
37+
# `g:snips_author` <`g:snips_email`>
38+
#
39+
# === Copyright
40+
#
41+
# Copyright `strftime("%Y")` `g:snips_author`
42+
#
43+
class $1 (${3}){
44+
${4}
45+
}
46+
47+
snippet defheader
48+
# == Define: ${1:`vim_snippets#Filename(expand('%:p:s?.*modules/??:r:s?/manifests/?::?'), 'name')`}
49+
#
50+
# ${2:Full description of defined resource type $1 here}
51+
#
52+
# === Parameters
53+
#
54+
# Document parameters here
55+
#
56+
# [*namevar*]
57+
# If there is a parameter that defaults to the value of the title string
58+
# when not explicitly set, you must always say so. This parameter can be
59+
# referred to as a "namevar," since it's functionally equivalent to the
60+
# namevar of a core resource type.
61+
#
62+
# [*basedir*]
63+
# Description of this variable. For example, "This parameter sets the
64+
# base directory for this resource type. It should not contain a trailing
65+
# slash."
66+
#
67+
# === Examples
68+
#
69+
# Provide some examples on how to use this type:
70+
#
71+
# $1 { 'namevar':
72+
# basedir => '/tmp/src',
73+
# }
74+
#
75+
# === Authors
76+
#
77+
# `g:snips_author` <`g:snips_email`>
78+
#
79+
# === Copyright
80+
#
81+
# Copyright `strftime("%Y")` `g:snips_author`
82+
#
83+
define $1(${3}) {
84+
${4}
85+
}
86+
687
# Language Constructs
788
snippet class
889
class ${1:`vim_snippets#Filename('', 'name')`} {

0 commit comments

Comments
 (0)