summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2014-12-04 12:10:28 +0100
committerrekado <rekado@elephly.net>2014-12-04 12:10:28 +0100
commit57a29c190c0ea3bd5c8a9b3835fa48d462864d5b (patch)
tree9439b8e4243a0016fa67fcac63cd902980b8f14a /lisp
parent046ec0c13090e04b1289a5cd892c86c86606c678 (diff)
add and bind smart-open-line function
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-my-stuff.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/init-my-stuff.el b/lisp/init-my-stuff.el
index 2dcc186..1c0f084 100644
--- a/lisp/init-my-stuff.el
+++ b/lisp/init-my-stuff.el
@@ -68,3 +68,13 @@
;; easier way to jump to other window
(global-set-key (kbd "M-o") 'other-window)
+
+
+(defun my/smart-open-line ()
+ "Insert an empty line after the current line.
+Position the cursor at its beginning, according to the current mode."
+ (interactive)
+ (move-end-of-line nil)
+ (newline-and-indent))
+
+(global-set-key [(shift return)] 'my/smart-open-line)