Add org format function
This commit is contained in:
parent
21f49b4738
commit
09ed893f1f
3 changed files with 18 additions and 2 deletions
17
custom/org-format.el
Normal file
17
custom/org-format.el
Normal file
|
@ -0,0 +1,17 @@
|
|||
(defun org-format ()
|
||||
(interactive)
|
||||
(goto-char (region-beginning))
|
||||
(while (re-search-forward " -" nil t)
|
||||
(replace-match " –"))
|
||||
(goto-char (region-beginning))
|
||||
(while (re-search-forward "'" nil t)
|
||||
(replace-match "’"))
|
||||
(goto-char (region-beginning))
|
||||
(while (re-search-forward "\\R\"" nil t)
|
||||
(replace-match "\\R“"))
|
||||
(goto-char (region-beginning))
|
||||
(while (re-search-forward " \"" nil t)
|
||||
(replace-match " “"))
|
||||
(goto-char (region-beginning))
|
||||
(while (re-search-forward "\"" nil t)
|
||||
(replace-match "”")))
|
Loading…
Add table
Add a link
Reference in a new issue