(Emacs/config|core)+move-line-{up|down}
This commit is contained in:
@@ -184,6 +184,27 @@ any buffers in ~+oreo/keep-buffer~ and kills the rest.
|
|||||||
(kill-buffer buf)))
|
(kill-buffer buf)))
|
||||||
(buffer-list)))
|
(buffer-list)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
** Move line {up/down}
|
||||||
|
Shamelessly copied from
|
||||||
|
[[https://emacsredux.com/blog/2013/04/02/move-current-line-up-or-down/][this
|
||||||
|
article]]. Will be bound in [[file:core.org::*Some binds in
|
||||||
|
Emacs][core.org]].
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun move-line-up ()
|
||||||
|
"Move up the current line."
|
||||||
|
(interactive)
|
||||||
|
(transpose-lines 1)
|
||||||
|
(forward-line -2)
|
||||||
|
(indent-according-to-mode))
|
||||||
|
|
||||||
|
(defun move-line-down ()
|
||||||
|
"Move down the current line."
|
||||||
|
(interactive)
|
||||||
|
(forward-line 1)
|
||||||
|
(transpose-lines 1)
|
||||||
|
(forward-line -1)
|
||||||
|
(indent-according-to-mode))
|
||||||
|
#+end_src
|
||||||
* Aesthetics
|
* Aesthetics
|
||||||
General look and feel of Emacs (mostly disabling stuff I don't like).
|
General look and feel of Emacs (mostly disabling stuff I don't like).
|
||||||
** Themes
|
** Themes
|
||||||
|
|||||||
@@ -118,6 +118,11 @@ Some bindings that I couldn't fit elsewhere easily.
|
|||||||
:general
|
:general
|
||||||
("C-x d" #'delete-frame)
|
("C-x d" #'delete-frame)
|
||||||
|
|
||||||
|
(nmmap
|
||||||
|
:keymaps 'override
|
||||||
|
"C-M-j" #'move-line-down
|
||||||
|
"C-M-k" #'move-line-up)
|
||||||
|
|
||||||
(nmmap
|
(nmmap
|
||||||
"C--" #'text-scale-decrease
|
"C--" #'text-scale-decrease
|
||||||
"C-=" #'text-scale-increase
|
"C-=" #'text-scale-increase
|
||||||
|
|||||||
Reference in New Issue
Block a user