diff --git a/emacs.d/init.el b/emacs.d/init.el index a5349f5..8ae8b47 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -111,6 +111,11 @@ (setq whitespace-style '(face empty tabs lines-tail trailing)) (global-whitespace-mode t) +;; Snippets +(use-package yasnippet + :ensure t) +(yas-global-mode 1) + ;; auto-pairs (electric-pair-mode 1) diff --git a/emacs.d/snippets/markdown-mode/.yas-compiled-snippets.el b/emacs.d/snippets/markdown-mode/.yas-compiled-snippets.el new file mode 100644 index 0000000..cf4baa9 --- /dev/null +++ b/emacs.d/snippets/markdown-mode/.yas-compiled-snippets.el @@ -0,0 +1,8 @@ +;;; Compiled snippets and support files for `markdown-mode' +;;; Snippet definitions: +;;; +(yas-define-snippets 'markdown-mode + '(("header" "+++\ntitle = \"${1:title}\"\ndate = `(format-time-string \"%Y-%m-%d\")`\n\n[taxonomies]\ntags = [\"${3:tag}\"]\n+++\n\n$0\n\n" "Markdown header" nil nil nil "/home/juliobiason/.emacs.d/snippets/markdown-mode/header" nil nil))) + + +;;; Do not edit! File generated at Sun Dec 13 13:51:57 2020 diff --git a/emacs.d/snippets/markdown-mode/header b/emacs.d/snippets/markdown-mode/header new file mode 100644 index 0000000..043e4b8 --- /dev/null +++ b/emacs.d/snippets/markdown-mode/header @@ -0,0 +1,15 @@ +-*- mode: snippet -*- +# name: Markdown header +# key: header +# -- ++++ +title = "${1:title}" +date = `(format-time-string "%Y-%m-%d")` + +[taxonomies] +tags = ["${3:tag}"] ++++ + +$0 + + \ No newline at end of file diff --git a/emacs.d/snippets/python-mode/.yas-compiled-snippets.el b/emacs.d/snippets/python-mode/.yas-compiled-snippets.el new file mode 100644 index 0000000..133b73e --- /dev/null +++ b/emacs.d/snippets/python-mode/.yas-compiled-snippets.el @@ -0,0 +1,2 @@ +;;; Compiled snippets and support files for `python-mode' +;;; Do not edit! File generated at Sun Dec 13 13:51:57 2020 diff --git a/emacs.d/snippets/rust-mode/.yas-compiled-snippets.el b/emacs.d/snippets/rust-mode/.yas-compiled-snippets.el new file mode 100644 index 0000000..74895c0 --- /dev/null +++ b/emacs.d/snippets/rust-mode/.yas-compiled-snippets.el @@ -0,0 +1,2 @@ +;;; Compiled snippets and support files for `rust-mode' +;;; Do not edit! File generated at Sun Dec 13 13:51:57 2020