spacemacs/contrib/auto-completion/snippets/emacs-lisp-mode/new-package
Diego Berrocal 7d53585795 Add Spacemacs Snippets
There are many stuff that we have in spacemacs which are creating new
layers and also creating micro-states. This Snippets try to help with
the process (the micro-state is a work in progress).

I also set the binding `C-s-/` to `(yas-next-field-or-maybe-expand)`
because `tab` doesn't have the behaviour I quite want (to be able to
expand a snippet like (defun) inside the new-package snippet and still
be able to continue in the outer snippet afterwards. With `tab` this
is *not* possible, but with `C-M-/` it *is*.

Changed variable name

Changed keybinding

Renamed snip-dir to spacemacs-snippets-dir

Moved `setq` outsidde of inizialization function, and the keybindning
too
2015-06-08 00:59:44 -04:00

15 lines
436 B
Plaintext

# -*- mode: snippet; require-final-newline: nil -*-
# contributor: Diego Berrocal (cestdiego 4t gm4il d0t com)
# name: new-package
# key: newp
# binding: direct-keybinding
# --
(defun `(spacemacs/get-parent-dir)`/init-${2:package-name} ()
${3:(use-package $2
${4::defer t
}${5::init
${;; This block executes before the package has been loaded}
}${:config
${;; This block executes after the package has been loaded}
})})
$0