summaryrefslogtreecommitdiff
path: root/settings/setup-markdown-mode.el
diff options
context:
space:
mode:
authorbenj <benj@rse8.com>2016-05-15 21:19:51 -0700
committerbenj <benj@rse8.com>2016-05-15 21:19:51 -0700
commit529fb864f0ef8719d477b9f12bc2686b34db7039 (patch)
treea9af49221a217eeeb352b8823e02e7cda81826d4 /settings/setup-markdown-mode.el
downloademacs-529fb864f0ef8719d477b9f12bc2686b34db7039.tar
emacs-529fb864f0ef8719d477b9f12bc2686b34db7039.tar.gz
emacs-529fb864f0ef8719d477b9f12bc2686b34db7039.tar.bz2
emacs-529fb864f0ef8719d477b9f12bc2686b34db7039.tar.lz
emacs-529fb864f0ef8719d477b9f12bc2686b34db7039.tar.xz
emacs-529fb864f0ef8719d477b9f12bc2686b34db7039.tar.zst
emacs-529fb864f0ef8719d477b9f12bc2686b34db7039.zip
initial minimal setup
Diffstat (limited to '')
-rw-r--r--settings/setup-markdown-mode.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/settings/setup-markdown-mode.el b/settings/setup-markdown-mode.el
new file mode 100644
index 0000000..13c5ec0
--- /dev/null
+++ b/settings/setup-markdown-mode.el
@@ -0,0 +1,17 @@
+(setq markdown-imenu-generic-expression
+ '(("title" "^\\(.*\\)[\n]=+$" 1)
+ ("h2-" "^\\(.*\\)[\n]-+$" 1)
+ ("h1" "^# \\(.*\\)$" 1)
+ ("h2" "^## \\(.*\\)$" 1)
+ ("h3" "^### \\(.*\\)$" 1)
+ ("h4" "^#### \\(.*\\)$" 1)
+ ("h5" "^##### \\(.*\\)$" 1)
+ ("h6" "^###### \\(.*\\)$" 1)
+ ("fn" "^\\[\\^\\(.*\\)\\]" 1)
+ ))
+
+(add-hook 'markdown-mode-hook
+ (lambda ()
+ (setq imenu-generic-expression markdown-imenu-generic-expression)))
+
+(provide 'setup-markdown-mode)