Update line moving commands
This commit is contained in:
parent
772e01c483
commit
c94e73f52d
2 changed files with 6 additions and 2 deletions
|
@ -90,14 +90,16 @@ Position the cursor at its beginning, according to the current mode."
|
|||
"Move up the current line."
|
||||
(interactive)
|
||||
(transpose-lines 1)
|
||||
(forward-line -2))
|
||||
(forward-line -2)
|
||||
(indent-according-to-mode))
|
||||
|
||||
(defun prelude-move-line-down ()
|
||||
"Move down the current line."
|
||||
(interactive)
|
||||
(forward-line 1)
|
||||
(transpose-lines 1)
|
||||
(forward-line -1))
|
||||
(forward-line -1)
|
||||
(indent-according-to-mode))
|
||||
|
||||
(defun prelude-indent-buffer ()
|
||||
"Indent the currently visited buffer."
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
(define-key map [(shift return)] 'prelude-smart-open-line)
|
||||
(define-key map [(control shift up)] 'prelude-move-line-up)
|
||||
(define-key map [(control shift down)] 'prelude-move-line-down)
|
||||
(define-key map [(meta shift up)] 'prelude-move-line-up)
|
||||
(define-key map [(meta shift down)] 'prelude-move-line-down)
|
||||
(define-key map (kbd "C-c n") 'prelude-cleanup-buffer)
|
||||
(define-key map (kbd "C-c f") 'prelude-recentf-ido-find-file)
|
||||
(define-key map (kbd "C-M-\\") 'prelude-indent-region-or-buffer)
|
||||
|
|
Loading…
Reference in a new issue