My firsts steps with yasnippet
Thanks go to Jake B. for his comprehensive video about Yasnippet.
This tutorial is what I grab from that excellent video.
This tutorial is what I grab from that excellent video.
Install yasnippet with
M-x package-installThen enter
yasnippet
Configure yasnippet:
(use-package yasnippet
:config
(setq yas-snippet-dirs '("~/.emacs.d/mysnippets"))
(yas-global-mode 1))
Create a new snippet:
M-x yas-new-snippetSave it under the yas-snippet-dirs sub-directory corresponding to the mode you want it to apply: if the snippet is for php-mode, then save it under
~/.emacs.d/mysnippets/php-mode/