commit 092d437c507ecc0e1d989f7c1945208597b239a6 parent 245274f9b4a247627749d326be3d280a4d4c8973 Author: Alex Balgavy <alex@balgavy.eu> Date: Fri, 29 Jul 2022 20:11:46 +0200 emacs: unfill paragraph/region Diffstat:
M | emacs/config.org | | | 14 | ++++++++++++++ |
1 file changed, 14 insertions(+), 0 deletions(-)
diff --git a/emacs/config.org b/emacs/config.org @@ -2048,6 +2048,20 @@ Sometimes I want to toggle auto reverting (or autoread) of buffer: #+begin_src emacs-lisp (za/global-set-key (kbd "C-c q a") #'auto-revert-mode) #+end_src +** Unfill region/paragraph +Taken from here: https://www.emacswiki.org/emacs/UnfillParagraph + +#+begin_src emacs-lisp + (defun za/unfill-paragraph (&optional region) + "Takes a multi-line paragraph and makes it into a single line of text." + (interactive (progn (barf-if-buffer-read-only) '(t))) + (let ((fill-column (point-max)) + ;; This would override `fill-column' if it's an integer. + (emacs-lisp-docstring-fill-column t)) + (fill-paragraph nil region))) + + (za/global-set-key (kbd "M-Q") #'za/unfill-paragraph) +#+end_src * Markdown Markdown mode settings.