Add some extra keybindings

`prelude-smart-open-line` is now bound to `M-o` as well
`prelude-start-open-line-above` is not bound to `M-O` as well
This commit is contained in:
Bozhidar Batsov 2013-06-15 16:57:29 +03:00
parent 457017a5a6
commit 6e7e7a4557
3 changed files with 5 additions and 3 deletions

View file

@ -216,8 +216,8 @@ Keybinding | Description
-------------------|------------------------------------------------------------
<kbd>C-c o</kbd> | Open the currently visited file with an external program.
<kbd>C-c g</kbd> | Search in Google for the thing under point (or an interactive query).
<kbd>C-S-RET</kbd> | Insert an empty line above the current line and indent it properly
<kbd>S-RET</kbd> | Insert an empty line and indent it properly (as in most IDEs).
<kbd>C-S-RET</kbd> or <kbd>M-o</kbd> | Insert an empty line above the current line and indent it properly
<kbd>S-RET</kbd> or <kbd>M-O</kbd> | Insert an empty line and indent it properly (as in most IDEs).
<kbd>C-S-up</kbd> | Move the current line up.
<kbd>C-S-down</kbd> | Move the current line down.
<kbd>C-c n</kbd> | Fix indentation in buffer and strip whitespace.

View file

@ -88,7 +88,7 @@ Position the cursor at it's beginning, according to the current mode."
(move-beginning-of-line nil)
(newline-and-indent)
(forward-line -1)
(funcall indent-line-function))
(indent-according-to-mode))
(defun prelude-smart-open-line ()
"Insert an empty line after the current line.

View file

@ -39,7 +39,9 @@
(define-key map (kbd "C-c g") 'prelude-google)
;; mimic popular IDEs binding, note that it doesn't work in a terminal session
(define-key map [(shift return)] 'prelude-smart-open-line)
(define-key map (kbd "M-o") 'prelude-smart-open-line)
(define-key map [(control shift return)] 'prelude-smart-open-line-above)
(define-key map (kbd "M-O") 'prelude-smart-open-line-above)
(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)