summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-08-01 00:24:45 -0400
committerKyle Meyer <kyle@kyleam.com>2015-08-01 00:24:45 -0400
commit311dc8a870a8754b3202965de882e7d92e9d8a19 (patch)
tree12c2c8d36adaee8fee28600136ff0e57f03a89f3
parenta92f6a149623022dfdfeb6b225b23a3257918b74 (diff)
downloademacs.d-311dc8a870a8754b3202965de882e7d92e9d8a19.tar.gz
Add private snippets directory
-rw-r--r--.gitignore1
-rw-r--r--lisp/init-yas.el6
2 files changed, 7 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 14a1fad..4cb658d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,4 @@ bookmarks
/.custom.el
/server
/semanticdb
+/psnippets
diff --git a/lisp/init-yas.el b/lisp/init-yas.el
index 04e0681..33a52f8 100644
--- a/lisp/init-yas.el
+++ b/lisp/init-yas.el
@@ -3,6 +3,12 @@
(setq yas-fallback-behavior nil)
+(defvar km/personal-snippets
+ (file-name-as-directory (expand-file-name "psnippets" user-emacs-directory)))
+
+(when (file-exists-p km/personal-snippets)
+ (add-to-list 'yas-snippet-dirs km/personal-snippets))
+
(define-key yas-minor-mode-map (kbd "C-c i") 'yas-expand)
;; Remove commands with 'C-c &' prefix, which conflicts with
;; `org-mark-ring-goto' binding'