[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/objed c34727c 122/166: Add open line command
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/objed c34727c 122/166: Add open line command |
Date: |
Sun, 29 Dec 2019 08:21:12 -0500 (EST) |
branch: externals/objed
commit c34727c92781aba474dd4c3b647f46e1fc608f26
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Add open line command
---
objed.el | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/objed.el b/objed.el
index 966bcc4..c2d5b74 100644
--- a/objed.el
+++ b/objed.el
@@ -635,6 +635,8 @@ BEFORE and AFTER are forms to execute before/after calling
the command."
;; common emacs keys
(define-key map (kbd "C-g") 'objed-quit)
(define-key map (kbd "?") 'objed-show-top-level)
+ (define-key map (kbd "C-o") 'objed-open-line)
+
;; TODO: switch with q, so quit window is qq?
(define-key map "g" 'objed-quit)
(define-key map "q" 'objed-quit-window-or-reformat)
@@ -2840,6 +2842,20 @@ Moves point over any whitespace afterwards."
(interactive "r")
(indent-region beg end))
+(defun objed-open-line ()
+ "Open line."
+ (interactive)
+ (back-to-indentation)
+ (if electric-indent-inhibit
+ (let ((indent (buffer-substring (line-beginning-position)
+ (point))))
+ (save-excursion
+ (insert "\n")
+ (insert indent)))
+ (save-excursion
+ (newline)
+ (indent-according-to-mode)))
+ (objed--reset))
(defun objed-indent-left (arg)
"Indent all lines in object leftward by ARG space."
(interactive "p")
- [elpa] externals/objed 2ea1ebb 101/166: Adjust default binding scheme, (continued)
- [elpa] externals/objed 2ea1ebb 101/166: Adjust default binding scheme, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 044930f 107/166: Add kill-buffer to cmd-alist, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed c0c6337 109/166: Improve mark-more command, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 15e49df 105/166: Refactor mode body add buffer display functions to auto init, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed e7736a9 106/166: Update for new bindings, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 84b1465 112/166: Don't switch object for paragraph kill/delete, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed bd57a83 117/166: Improve continuation for inner state of balanced objects, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 4ffaef1 118/166: Improve object state handling for default movement commands, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed cf22d17 119/166: Improve block expansion, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed bade5a0 123/166: Improve slurping/barfing for sexps, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed c34727c 122/166: Add open line command,
Clemens Radermacher <=
- [elpa] externals/objed 502fb77 127/166: Reset object if marker point into wrong buffer, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 94eee2d 126/166: Add window resize commands, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 6e08bc8 129/166: Fix hl-line integration, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed da4dae5 131/166: Allow navigating overlay faces, too, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed aca0c7a 133/166: Add error object, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 19eb055 136/166: Improve mail object regex, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed e079d7e 132/166: Use default binding for read only toggle in op map, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 71dc168 135/166: Fix skipping object when one char before it, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 1c152a1 137/166: Fix mc/num-cursors undefined when mc not loaded, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed f08f689 142/166: Some improvements for auto activation, Clemens Radermacher, 2019/12/29