Add new command prelude-top-join-line
Saner version of the built-in `join-line`, that joins lines from the top to the bottom.
This commit is contained in:
parent
d01818207c
commit
4d15923e2c
3 changed files with 7 additions and 2 deletions
|
@ -197,7 +197,7 @@ Keybinding | Description
|
||||||
<kbd>C-+</kbd> | Increase font size(`text-scale-increase`).
|
<kbd>C-+</kbd> | Increase font size(`text-scale-increase`).
|
||||||
<kbd>C--</kbd> | Decrease font size(`text-scale-decrease`).
|
<kbd>C--</kbd> | Decrease font size(`text-scale-decrease`).
|
||||||
<kbd>C-x O</kbd> | Go back to previous window (the inverse of `other-window` (`C-x o`)).
|
<kbd>C-x O</kbd> | Go back to previous window (the inverse of `other-window` (`C-x o`)).
|
||||||
<kbd>C-x ^</kbd> | Join two lines into one(`join-line`).
|
<kbd>M-^</kbd> | Join two lines into one(`prelude-top-join-line`).
|
||||||
<kbd>C-x p</kbd> | Start `proced` (manage processes from Emacs; works only in Linux).
|
<kbd>C-x p</kbd> | Start `proced` (manage processes from Emacs; works only in Linux).
|
||||||
<kbd>C-x m</kbd> | Start `eshell`.
|
<kbd>C-x m</kbd> | Start `eshell`.
|
||||||
<kbd>C-x M-m</kbd> | Start your default shell.
|
<kbd>C-x M-m</kbd> | Start your default shell.
|
||||||
|
|
|
@ -97,6 +97,11 @@ Position the cursor at its beginning, according to the current mode."
|
||||||
(move-end-of-line nil)
|
(move-end-of-line nil)
|
||||||
(newline-and-indent))
|
(newline-and-indent))
|
||||||
|
|
||||||
|
(defun prelude-top-join-line ()
|
||||||
|
"Join the current line with the line beneath it."
|
||||||
|
(interactive)
|
||||||
|
(delete-indentation 1))
|
||||||
|
|
||||||
(defun prelude-move-line-up ()
|
(defun prelude-move-line-up ()
|
||||||
"Move the current line up."
|
"Move the current line up."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
(other-window -1))) ;; back one
|
(other-window -1))) ;; back one
|
||||||
|
|
||||||
;; Indentation help
|
;; Indentation help
|
||||||
(global-set-key (kbd "C-x ^") 'join-line)
|
(global-set-key (kbd "M-^") 'prelude-top-join-line)
|
||||||
|
|
||||||
;; Start proced in a similar manner to dired
|
;; Start proced in a similar manner to dired
|
||||||
(global-set-key (kbd "C-x p") 'proced)
|
(global-set-key (kbd "C-x p") 'proced)
|
||||||
|
|
Loading…
Reference in a new issue