diff --git a/config.el b/config.el index b1bc885..26b0cca 100644 --- a/config.el +++ b/config.el @@ -1,7 +1,9 @@ (defvar +wiki-directory "~/writings/wiki") (defvar +wiki-notebook-name "notebook") (defvar +wiki-notebook-directory (f-join +wiki-directory +wiki-notebook-name)) + (defvar my/wiki-asset-directory-name "assets") +(defvar my/wiki-exercises-directory "challenges") (defun my/is-in-wiki-directory (&optional filename) "Return t if the file buffer is in the wiki directory." @@ -13,6 +15,18 @@ t nil)) +;; Automate updating timestamps on save. +(add-hook! 'before-save-hook 'time-stamp) + +;; Custom keybindings +(map! + (:when (modulep! :tools wiki) + :leader + :prefix "nr" :desc "Create the asset folder" "m" #'my/create-assets-folder) + + (:when (modulep! :editor format) + :n "g=" #'+format/buffer)) + (defun my/get-assets-folder (&optional filename) "Get the assets folder of the current Org mode document." (unless filename (setq filename (buffer-file-name)))