Bind RET to +eshell/goto-end-of-prompt from normal mode
This command enters insert state.
This commit is contained in:
parent
c1c3a0987c
commit
e70b1af49f
2 changed files with 9 additions and 0 deletions
|
@ -11,6 +11,14 @@ already there)."
|
||||||
(point-max)
|
(point-max)
|
||||||
eshell-last-output-end))))
|
eshell-last-output-end))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +eshell/goto-end-of-prompt ()
|
||||||
|
"Move cursor to the prompt when switching to insert mode (if point isn't
|
||||||
|
already there)."
|
||||||
|
(interactive)
|
||||||
|
(goto-char (point-max))
|
||||||
|
(evil-append 1))
|
||||||
|
|
||||||
;;;###autoload (autoload '+eshell:run "tools/eshell/autoload/evil" nil t)
|
;;;###autoload (autoload '+eshell:run "tools/eshell/autoload/evil" nil t)
|
||||||
(evil-define-command +eshell:run (command bang)
|
(evil-define-command +eshell:run (command bang)
|
||||||
;; TODO Add COMMAND support
|
;; TODO Add COMMAND support
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
"Setup eshell keybindings. This must be done in a hook because eshell-mode
|
"Setup eshell keybindings. This must be done in a hook because eshell-mode
|
||||||
redefines its keys every time `eshell-mode' is enabled."
|
redefines its keys every time `eshell-mode' is enabled."
|
||||||
(map! :map eshell-mode-map
|
(map! :map eshell-mode-map
|
||||||
|
:n [return] #'+eshell/goto-end-of-prompt
|
||||||
:n "c" #'+eshell/evil-change
|
:n "c" #'+eshell/evil-change
|
||||||
:n "C" #'+eshell/evil-change-line
|
:n "C" #'+eshell/evil-change-line
|
||||||
:n "d" #'+eshell/evil-delete
|
:n "d" #'+eshell/evil-delete
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue