aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs/config.org
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2020-09-27 21:45:03 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2020-09-27 21:45:03 +0100
commit1da0fda75b5d2d95a82e04849dfb3c43b53ebccb (patch)
tree08e0f4d95a19f64ee2a4c67f9c833b2174fd6372 /Emacs/.config/emacs/config.org
parent9afc74f0fe3d620e2dd224498b840d3e62c0aa8b (diff)
downloaddotfiles-1da0fda75b5d2d95a82e04849dfb3c43b53ebccb.tar.gz
dotfiles-1da0fda75b5d2d95a82e04849dfb3c43b53ebccb.tar.bz2
dotfiles-1da0fda75b5d2d95a82e04849dfb3c43b53ebccb.zip
(Emacs)~yasnipet -> snippets
Now creating a system to use skeleton and abbrev to replace yasnippet
Diffstat (limited to 'Emacs/.config/emacs/config.org')
-rw-r--r--Emacs/.config/emacs/config.org30
1 files changed, 25 insertions, 5 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index 0a1f027..9b70c03 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -830,12 +830,29 @@ Use hydras for stuff that I use often, currently buffer manipulation
("p" dx:paste-section)
("TAB" evil-toggle-fold)))
#+end_src
-** Yasnippet
-*** Preamble
-Yasnippet is a great package for snippets, which I use heavily in
-programming and org-mode. I setup here the global mode for yasnippet
-and a collection of snippets for ease of use.
+** Snippets
+*** Snippets Preamble
+Snippets are a system by which pieces of code can be inserted via
+prefixes. For example, an 'if' snippet would work by first inserting
+the word 'if' then pressing some _expansion key_ such as TAB. This
+will insert a set of text that may be have some components that need
+to be further filled by the user.
+
+The popular solution is Yasnippet. Yasnippet is a great package for
+snippets, which I use heavily in programming and org-mode. I setup
+here the global mode for yasnippet and a collection of snippets for
+ease of use.
+
+However, Emacs provides its own 'auto typing' facilities. Abbrevs and
+skeletons make up the popular solution within Emacs default. Abbrevs
+are for simple expressions wherein there is only one user input (say,
+getting today's time which only requires you asking for it). They
+provide a lot of inbuilt functionality and are quite useful.
+Skeletons, on the other hand, are for higher level insertions
*** Yasnippet default
+:PROPERTIES:
+:header-args:emacs-lisp: :tangle no
+:END:
Setup global mode after evil mode has been loaded
#+begin_src emacs-lisp
(use-package yasnippet
@@ -850,6 +867,9 @@ Setup global mode after evil mode has been loaded
(yas-load-directory (no-littering-expand-etc-file-name "yasnippet/snippets")))
#+end_src
*** Yasnippet snippets
+:PROPERTIES:
+:header-args:emacs-lisp: :tangle no
+:END:
Collection of snippets, activate after yasnippet has been loaded.
#+begin_src emacs-lisp
(use-package yasnippet-snippets