Skip to content

Commit

Permalink
hop to bottom on eshell insert
Browse files Browse the repository at this point in the history
  • Loading branch information
nathantypanski committed Aug 29, 2014
1 parent cf66a24 commit 9c8cf29
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions config/my-eshell.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
(after 'evil

(defun my-eshell-hop-to-bottom ()
"Go to the end of the buffer and eshell prompt."
(interactive)
(evil-goto-line)
(eshell-bol))

(defun my-is-eshell-before-prompt ()
"Call THEN if point is before the end of the eshell prompt. Otherwise call ELSE if present."
(let ((oldpt (point))
Expand All @@ -17,15 +24,12 @@
"If the eshell prompt is before point, enter insert state. Otherwise, insert after the prompt"
(interactive)
(if (my-is-eshell-before-prompt)
(eshell-bol))
(progn
(eshell-bol)
(my-eshell-hop-to-bottom)
))
(evil-insert-state))

(defun my-eshell-hop-to-bottom ()
"Go to the end of the buffer and eshell prompt."
(interactive)
(evil-goto-line)
(eshell-bol))

(defun my-eshell-evil-append (count &optional vcount skip-empty-lines)
"Switch to Insert state just after point .
The insertion will be repeated COUNT times and repeated once for
Expand Down

0 comments on commit 9c8cf29

Please sign in to comment.