markdown: refactor config
This commit is contained in:
parent
2cbcf55a24
commit
1addb26840
1 changed files with 20 additions and 24 deletions
|
@ -7,36 +7,32 @@
|
||||||
markdown-wrap-or-insert
|
markdown-wrap-or-insert
|
||||||
markdown-unwrap-thing-at-point)
|
markdown-unwrap-thing-at-point)
|
||||||
:init
|
:init
|
||||||
(add-hook 'markdown-mode-hook 'narf|enable-hard-wrap)
|
(add-hook 'markdown-mode-hook 'turn-on-auto-fill)
|
||||||
:config
|
:config
|
||||||
(sp-local-pair 'markdown-mode "```" "```"
|
(map! :map markdown-mode-map
|
||||||
:post-handlers '(("||\n[i]" "RET"))
|
"<backspace>" nil
|
||||||
:unless '(sp-point-before-word-p sp-point-before-same-p))
|
"<M-left>" nil
|
||||||
|
"<M-right>" nil
|
||||||
|
|
||||||
(map! (:map markdown-mode-map
|
;; Assumes you have a markdown renderer plugin in chrome
|
||||||
"<backspace>" nil
|
:nv "M-r" (λ! (narf-open-with "Google Chrome"))
|
||||||
"<M-left>" nil
|
|
||||||
"<M-right>" nil
|
|
||||||
|
|
||||||
;; Assumes you have a markdown renderer plugin in chrome
|
"M-*" 'markdown-insert-list-item
|
||||||
:nv "M-r" (λ! (narf-open-with "Google Chrome"))
|
"M-b" 'markdown-insert-bold
|
||||||
|
"M-i" 'markdown-insert-italic
|
||||||
|
"M-`" 'narf/markdown-insert-del
|
||||||
|
|
||||||
"M-*" 'markdown-insert-list-item
|
(:localleader
|
||||||
"M-b" 'markdown-insert-bold
|
:nv "i" 'markdown-insert-image
|
||||||
"M-i" 'markdown-insert-italic
|
:nv "l" 'markdown-insert-link
|
||||||
"M-`" 'narf/markdown-insert-del
|
:nv "L" 'markdown-insert-reference-link-dwim
|
||||||
|
:nv "b" 'markdown-preview)
|
||||||
|
|
||||||
(:localleader
|
;; TODO: Make context sensitive
|
||||||
:nv "i" 'markdown-insert-image
|
:n "[p" 'markdown-promote
|
||||||
:nv "l" 'markdown-insert-link
|
:n "]p" 'markdown-demote
|
||||||
:nv "L" 'markdown-insert-reference-link-dwim
|
|
||||||
:nv "b" 'markdown-preview)
|
|
||||||
|
|
||||||
;; TODO: Make context sensitive
|
:i "M--" 'markdown-insert-hr)
|
||||||
:n "[p" 'markdown-promote
|
|
||||||
:n "]p" 'markdown-demote
|
|
||||||
|
|
||||||
:i "M--" 'markdown-insert-hr))
|
|
||||||
|
|
||||||
(use-package markdown-toc :commands (markdown-toc-generate-toc)))
|
(use-package markdown-toc :commands (markdown-toc-generate-toc)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue