]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
yasnippet adjust cfengine filetemplate master
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Sat, 3 Oct 2026 11:04:11 +0000 (13:04 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Sat, 3 Oct 2026 11:04:11 +0000 (13:04 +0200)
* snippets/cfengine3-mode/filetemplate: proper indentation and all
necessary elements for mustache templates.

snippets/cfengine3-mode/filetemplate

index a21027b33a300be9edec0a1a95f5ef947efcfae9..d85ac4117d33c08383dee52f7b7ecae87ad1a5b2 100644 (file)
@@ -1,10 +1,12 @@
 # -*- mode: snippet -*-
 # name: filetemplate
 # key: filetemplate
 # -*- mode: snippet -*-
 # name: filetemplate
 # key: filetemplate
+# expand-env: ((yas-indent-line 'auto))
 # --
 "${1:file}"
 # --
 "${1:file}"
-handle => "${1:$(concat (replace-regexp-in-string "^bundle_agent_" "" (replace-regexp-in-string "[ /.-]" "_" (which-function))) "_edit" (replace-regexp-in-string "[ )$(/.-]" "_" (yas-text)))}",
-comment => "configure $1",
-perms => mog("${2:440}","${3:root}","${4:root}"),
-create => "${5:$$(yas-choose-value '("true" "false"))}",
-edit_template => "\$(this.promise_dirname)/templates/${6}";
+  handle => "\$(this.bundle)_\$(this.promiser)",
+  perms => mog("${2:440}","${3:root}","${4:root}"),
+  create => "${5:$$(yas-choose-value '("true" "false"))}",
+  template_method => "mustache",
+  edit_template => "\$(this.promise_dirname)/templates/${6}.mustache",
+  comment => "$0";