Enhance table.el editing in markdown-mode
Pandoc supports grid tables, which are supported in Emacs via `table.el`. By default, the alignment markers for those tables (:) are not recognized in table.el, so let's add those. Furthermore, editing grid tables in `markdown-mode` does not work, since `jit-lock-mode` overwrites the `keymap` text property that `table.el` relies on to enable table editing. Using `edit-indirect` to edit those tables in an indirect buffer where everything works nicely. Indeed, editing `table.el` tables in Org also uses an indirect buffer, for the exact same reason.
This commit is contained in:
parent
a67e64a906
commit
212c3664ff
9
init.el
9
init.el
@ -2820,6 +2820,9 @@ eventuelly be set to nil, however)."
|
||||
(add-to-list 'major-mode-remap-alist '(latex-mode . LaTeX-mode))
|
||||
(require 'db-latex))
|
||||
|
||||
(use-package edit-indirect ; to allow code editing in markdown-mode
|
||||
:ensure t)
|
||||
|
||||
(use-package edit-list
|
||||
:ensure t
|
||||
:commands edit-list)
|
||||
@ -2922,6 +2925,12 @@ eventuelly be set to nil, however)."
|
||||
shr-image-animate nil
|
||||
shr-width (current-fill-column)))
|
||||
|
||||
(use-package table
|
||||
:init (progn
|
||||
;; Pandoc supports colons in grid tables to denote alignments, so let's have table.el
|
||||
;; recognize those too.
|
||||
(setq table-cell-horizontal-chars "-=:")))
|
||||
|
||||
(use-package textile-mode
|
||||
:config (progn
|
||||
;; Do not wrap lines automatically in textile mode, as text produced
|
||||
|
||||
Loading…
Reference in New Issue
Block a user