add unfill functions

This commit is contained in:
2021-04-12 18:34:35 +02:00
parent 63ffdc50ab
commit 51d8c63de0

View File

@@ -233,6 +233,26 @@ with a drive letter and a colon."))
;; truncate lines even in partial-width windows
;;(setq truncate-partial-width-windows t)
(defun my-unfill-paragraph ()
"Replace newline chars in current paragraph by single spaces.
This command does the inverse of `fill-paragraph'.
URL `http://ergoemacs.org/emacs/emacs_unfill-paragraph.html'
Version 2016-07-13"
(interactive)
(let ((fill-column most-positive-fixnum))
(fill-paragraph)))
(defun my-unfill-region (start end)
"Replace newline chars in region by single spaces.
This command does the inverse of `fill-region'.
URL `http://ergoemacs.org/emacs/emacs_unfill-paragraph.html'
Version 2016-07-13"
(interactive "r")
(let ((fill-column most-positive-fixnum))
(fill-region start end)))
(use-package so-long
:config
;;(add-to-list 'so-long-target-modes 'mhtml-mode t)
@@ -293,6 +313,8 @@ with a drive letter and a colon."))
(define-key minibuffer-local-must-match-map (kbd "<escape>") 'keyboard-escape-quit)
(define-key minibuffer-local-isearch-map (kbd "<escape>") 'keyboard-escape-quit)
;;
(define-key global-map "\M-Q" 'my-unfill-paragraph)
;;
(global-set-key (kbd "C-r") 'query-replace-regexp) ;; isearch-backward
(global-set-key (kbd "C-x C-b") 'ibuffer) ;; list-buffers
;; applications