From 9033403e94bb3f60257e7ddd13ddf7f2290f5f10 Mon Sep 17 00:00:00 2001 From: Tim McCarthy Date: Wed, 27 Feb 2019 11:39:34 -0800 Subject: [PATCH] Add more custom jump-to-notes shortcuts --- spacemacs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/spacemacs b/spacemacs index 731a2a4..2975e29 100644 --- a/spacemacs +++ b/spacemacs @@ -497,7 +497,18 @@ you should place your code here." (sp-pair "\"" nil :actions :rem))) (spacemacs/declare-prefix "o" "user prefix") - (spacemacs/set-leader-keys "op" 'go-to-projects-file)) + (spacemacs/set-leader-keys "op" 'go-to-projects-file) + (set-note-key "o g" "groceries" "Grocery.org") + (set-note-key "o G" "gloomhaven" "Games/Gloomhaven.org") + (set-note-key "o P" "play-list" "Games/PlayList.org")) + +(defun set-note-key (key label note-name) + (spacemacs/set-leader-keys + key + (lambda () + (interactive) + (find-file (concat "~/Dropbox/Notes/" note-name)))) + (which-key-add-key-based-replacements (concat "SPC " key) label)) (defun go-to-projects-file () (interactive)