diff --git a/README.md b/README.md index ea8b8fb..83162a2 100644 --- a/README.md +++ b/README.md @@ -216,8 +216,8 @@ Keybinding | Description -------------------|------------------------------------------------------------ C-c o | Open the currently visited file with an external program. C-c g | Search in Google for the thing under point (or an interactive query). -C-S-RET | Insert an empty line above the current line and indent it properly -S-RET | Insert an empty line and indent it properly (as in most IDEs). +C-S-RET or M-o | Insert an empty line above the current line and indent it properly +S-RET or M-O | Insert an empty line and indent it properly (as in most IDEs). C-S-up | Move the current line up. C-S-down | Move the current line down. C-c n | Fix indentation in buffer and strip whitespace. diff --git a/core/prelude-core.el b/core/prelude-core.el index 42139e5..e509892 100644 --- a/core/prelude-core.el +++ b/core/prelude-core.el @@ -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. diff --git a/core/prelude-mode.el b/core/prelude-mode.el index c88be39..b12d2e7 100644 --- a/core/prelude-mode.el +++ b/core/prelude-mode.el @@ -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)