aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2021-04-25 17:57:46 -0700
committerGravatar Tom Willemse2021-04-25 17:57:46 -0700
commitfda64e525ea6108ccac3e2f20ab7dad11a1eae21 (patch)
tree42494a9dc411d775e91356d3bb6c30c1955fc63a
parent1e974046c525540bbdbc0c1d2bf89fbdde56d8eb (diff)
downloademacs-config-fda64e525ea6108ccac3e2f20ab7dad11a1eae21.tar.gz
emacs-config-fda64e525ea6108ccac3e2f20ab7dad11a1eae21.zip
[oni-core] Add a function that does the reverse of ‘fill-paragraph’
This was taken from Bastien Guerry’s Emacs configuration: https://github.com/bzg/dotemacs
-rw-r--r--oni-core.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/oni-core.el b/oni-core.el
index ce65991..0ce6bc8 100644
--- a/oni-core.el
+++ b/oni-core.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2021.0425.175316
+;; Version: 2021.0425.175742
;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview)
;; This program is free software; you can redistribute it and/or modify
@@ -81,6 +81,14 @@
(end-of-line)))
(end-of-line))))
+;;; From Bastien Guerry’s Emacs configuraiton:
+;;; https://github.com/bzg/dotemacs/blob/master/emacs.org
+(defun oni-core-unfill-paragraph ()
+ "Make a multi-line paragraph into a single line of text."
+ (interactive)
+ (let ((fill-column (point-max)))
+ (fill-paragraph nil)))
+
(defun oni-core-recentf-save-list-silently ()
"Call ‘recentf-save-list’ but without showing a message about it."
(let ((inhibit-message t))
@@ -172,6 +180,7 @@ _s_: String list"
(global-set-key (kbd "C-S-n") 'windmove-down)
(global-set-key (kbd "C-S-p") 'windmove-up)
(global-set-key (kbd "C-c (") 'embrace-commander)
+(global-set-key (kbd "C-c q") #'oni-core-unfill-paragraph)
(global-set-key (kbd "C-c s") #'oni-sort-and-align-hydra/body)
(global-set-key (kbd "C-x C-b") 'ibuffer-jump)
(global-set-key (kbd "C-x M-f") 'ffap)