diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-10-16 16:49:57 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-10-16 16:49:57 +0100 |
commit | dcdce9e2552c61aec73e7e2835c4df585e234adb (patch) | |
tree | d294ee2193c9451a08ad8561bb89d8ac92829154 | |
parent | 3ea88a55a24704c2bd6a589006f4c427d22bb67c (diff) | |
download | dotfiles-dcdce9e2552c61aec73e7e2835c4df585e234adb.tar.gz dotfiles-dcdce9e2552c61aec73e7e2835c4df585e234adb.tar.bz2 dotfiles-dcdce9e2552c61aec73e7e2835c4df585e234adb.zip |
Adjust eshell bindings
I've now made the hook a function, so reloading this snippet will not
add useless extra functions to the hook.
Also a eshell/goto binding.
-rw-r--r-- | Emacs/.config/emacs/config.org | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 57c845e..93d2f0a 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1938,28 +1938,28 @@ them. (interactive) (eshell/clear-scrollback) (eshell-send-input)) + (add-hook 'eshell-mode-hook - (proc - (interactive) - ;; (nmap - ;; :keymaps 'eshell-mode-map - ;; "0" #'eshell-bol - ;; "I" (proc (interactive) - ;; (eshell-bol) - ;; (evil-insert 0))) - (general-def - :states '(normal insert visual) - :keymaps 'eshell-mode-map - "M-j" #'eshell-next-prompt - "M-k" #'eshell-previous-prompt - "C-j" #'eshell-next-matching-input-from-input - "C-k" #'eshell-previous-matching-input-from-input - "M-c" #'+eshell/good-clear) - (local-leader - :keymaps 'eshell-mode-map - "c" #'+eshell/good-clear - "k" #'eshell-kill-process)))) + (defun +eshell/--setup-keymap nil + (interactive) + (general-def + :states '(normal insert visual) + :keymaps 'eshell-mode-map + "M-j" #'eshell-next-prompt + "M-k" #'eshell-previous-prompt + "C-j" #'eshell-next-matching-input-from-input + "C-k" #'eshell-previous-matching-input-from-input) + + (local-leader + :keymaps 'eshell-mode-map + "g" (proc (interactive) + (let ((buffer (current-buffer))) + (eshell/goto) + (with-current-buffer buffer + (eshell-send-input)))) + "c" #'+eshell/good-clear + "k" #'eshell-kill-process)))) #+end_src *** EShell prompt Here I use my external library |