|
3 | 3 | # Please contact R.I.Pienaar <[email protected]> for additions and feedback,
|
4 | 4 | # see it in action @ http://www.devco.net/archives/2009/09/22/vim_and_puppet.php
|
5 | 5 |
|
| 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 | + |
6 | 87 | # Language Constructs
|
7 | 88 | snippet class
|
8 | 89 | class ${1:`vim_snippets#Filename('', 'name')`} {
|
|
0 commit comments