Merge pull request #1917 from darth10/feature-grip-mode

lang/markdown: add +grip feature (live markdown previews)
This commit is contained in:
Henrik Lissner 2019-10-18 17:21:59 -04:00 committed by GitHub
commit 55a6abbc91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 1 deletions

View file

@ -118,10 +118,12 @@ installed through your OS's package manager:
* Features * Features
** Markdown preview ** Markdown preview
~markdown-preview~ is bound to =SPC m b= (for Evil users) and =C-c l b= (for ~markdown-preview~ is bound to =SPC m p= (for Evil users) and =C-c l p= (for
non-evil users). This will open a preview of your compiled markdown document in non-evil users). This will open a preview of your compiled markdown document in
your browser. your browser.
Alternatively, you can use ~grip-mode~ through =+grip=.
* Configuration * Configuration
** Changing how markdown is compiled ** Changing how markdown is compiled
When ~markdown-preview~ is invoked (=SPC m b= or =C-c l b=), it consults When ~markdown-preview~ is invoked (=SPC m b= or =C-c l b=), it consults

View file

@ -69,6 +69,8 @@ capture, the end position, and the output buffer.")
"o" #'markdown-open "o" #'markdown-open
"p" #'markdown-preview "p" #'markdown-preview
"e" #'markdown-export "e" #'markdown-export
(:when (featurep! +grip)
"p" #'grip-mode)
(:prefix ("i" . "insert") (:prefix ("i" . "insert")
"t" #'markdown-toc-generate-toc "t" #'markdown-toc-generate-toc
"i" #'markdown-insert-image "i" #'markdown-insert-image

View file

@ -16,3 +16,7 @@
(unless (executable-find cmd) (unless (executable-find cmd)
(warn! "Couldn't find %S. markdown-preview command won't work" (warn! "Couldn't find %S. markdown-preview command won't work"
cmd)))))) cmd))))))
(when (featurep! +grip)
(unless (executable-find "grip")
(warn! "Couldn't find grip. grip-mode will not work")))

View file

@ -4,3 +4,6 @@
(package! markdown-mode) (package! markdown-mode)
(package! markdown-toc) (package! markdown-toc)
(package! edit-indirect) (package! edit-indirect)
(when (featurep! +grip)
(package! grip-mode))