Browse Source

Added snippets to Emacs

master
Julio Biason 4 years ago
parent
commit
efd323a749
  1. 5
      emacs.d/init.el
  2. 8
      emacs.d/snippets/markdown-mode/.yas-compiled-snippets.el
  3. 15
      emacs.d/snippets/markdown-mode/header
  4. 2
      emacs.d/snippets/python-mode/.yas-compiled-snippets.el
  5. 2
      emacs.d/snippets/rust-mode/.yas-compiled-snippets.el

5
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)

8
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<!-- more -->" "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

15
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
<!-- more -->

2
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

2
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
Loading…
Cancel
Save