diff options
Diffstat (limited to 'mnpgr.tl')
-rwxr-xr-x | mnpgr.tl | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -5,7 +5,8 @@ (defvarl mnpgr-dir (path-cat home-dir ".mnpgr-dir")) (defvarl vim-commands - (join-with "|" '("set syntax=help" + (join-with "|" '("set syntax=mnpgr" + "set conceallevel=2 concealcursor=nc" "map q :q!\r"))) (defun make-overstrike-filter (put-string-fn) @@ -15,19 +16,22 @@ (when (neq mode cur-mode) [put-string-fn closer] (caseq (set cur-mode mode) - (:bold [put-string-fn "*"] - (set closer "*")) - (:ital [put-string-fn "|"] - (set closer "|")) + (:bold [put-string-fn "{B{"] + (set closer "}B}")) + (:ital [put-string-fn "{I{"] + (set closer "}I}")) + (:bital [put-string-fn "{C{"] + (set closer "}C}")) (:norm (set closer "")))) [put-string-fn str])) (lambda (line) - (each ((tok (tok #/.\b./ t line))) + (each ((tok (tok #/.\b.(\b.)?/ t line))) (match-case tok ("") (`@{x #/ +/}` (output-text x :norm)) - (`@x\b@x` (output-text x :bold)) + (`_\b@x\b@x` (output-text x :bital)) (`_\b@x` (output-text x :ital)) + (`@x\b@x` (output-text x :bold)) (@else (output-text else :norm)))) (output-text "\n" :norm))))) |