Add org markup to electric-pairs when in org-mode

This commit is contained in:
MitchMarq42 2022-11-02 09:39:36 -08:00
parent 4037aa07e8
commit d703fb5a26
2 changed files with 14 additions and 0 deletions

View File

@ -16,3 +16,6 @@ There are a few things to immediately note:
- Typing ~qq~ will change your input method. This is sort-of a built-in feature, but the default trigger is to type ~C-\~, which is annoying to press. The ~qq~ behavior is built into Japanese-mode specifically and normally toggles in and out of ~japanese-ascii~, which is literally just normal text except ~qq~ switches back to Japanese.
* 2022-09-26 12:57 pm
This is the time of day that I wrote the thing that creates the above heading now. It works it works it works...
_this is underlined_ and that works with electric pairs now... "And" =so=
does +this and this and+ *not this* either...

View File

@ -471,6 +471,17 @@ targets."
(add-hook 'after-save-hook
#'(lambda () (if (equal major-mode 'org-mode)
(org-babel-tangle))))
(setq electric-pair-org-pairs `(
(,(string-to-char "_") . ,(string-to-char "_"))
(,(string-to-char "/") . ,(string-to-char "/"))
(,(string-to-char "*") . ,(string-to-char "*"))
(,(string-to-char "+") . ,(string-to-char "+"))
(,(string-to-char "+") . ,(string-to-char "+"))
(,(string-to-char "=") . ,(string-to-char "="))))
(dolist (pair electric-pair-org-pairs)
(add-to-list 'electric-pair-pairs
pair))
(require 'mitch-orgstuff)
:hook
(org-mode . turn-off-line-numbers)