diff options
author | Ryan Kavanagh <rak@rak.ac> | 2021-12-11 14:39:23 -0500 |
---|---|---|
committer | Ryan Kavanagh <rak@rak.ac> | 2021-12-11 14:39:23 -0500 |
commit | 93e94da455fe53ad2d2d77fa95e853d866b7fb55 (patch) | |
tree | 8ef3cd26dc8d23e1c116149b473929e3cd4c7fd9 /.emacs | |
parent | packages (diff) |
Added a single-lines-only function to emacs
Diffstat (limited to '.emacs')
-rw-r--r-- | .emacs | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -66,6 +66,14 @@ ;; (add-to-list 'latex-help-cmd-alist (cons key value)))))) ;; latex-help-cmd-alist)) +(defun single-lines-only () + "Replace multiple blank lines with a single one" + (interactive) + (goto-char (point-min)) + (while (re-search-forward "\\(^\\s-*$\\)\n" nil t) + (replace-match "\n") + (forward-char 1))) + (use-package ace-window :ensure t :custom |