Add vterm find-file alias and clear scrollback binding

This commit is contained in:
Jeremy Dormitzer 2021-03-08 14:15:20 -05:00
parent f8035efb4d
commit 8a56a1fc70
2 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,9 @@
(call-interactively #'vterm))) (call-interactively #'vterm)))
:config :config
(evil-collection-vterm-setup) (evil-collection-vterm-setup)
(general-def 'insert vterm-mode-map "C-<escape>" #'vterm-send-escape) (general-def 'insert vterm-mode-map
"C-<escape>" #'vterm-send-escape
"C-l" #'vterm-clear-scrollback)
;; Add a hook when vterm changes the directory ;; Add a hook when vterm changes the directory
(defvar vterm-directory-change-hook nil (defvar vterm-directory-change-hook nil
"Hooks to be run after vterm changes the directory") "Hooks to be run after vterm changes the directory")
@ -26,6 +28,7 @@
(vterm-environment '("TYPEWRITTEN_CURSOR=terminal")) (vterm-environment '("TYPEWRITTEN_CURSOR=terminal"))
(vterm-ignore-blink-cursor t) (vterm-ignore-blink-cursor t)
(vterm-eval-cmds '(("find-file" find-file) (vterm-eval-cmds '(("find-file" find-file)
("ff" find-file)
("message" message) ("message" message)
("vterm-clear-scrollback" vterm-clear-scrollback) ("vterm-clear-scrollback" vterm-clear-scrollback)
("man" man) ("man" man)

View File

@ -142,6 +142,7 @@ if [[ "$INSIDE_EMACS" = 'vterm' ]]; then
alias clear='vterm_printf "51;Evterm-clear-scrollback";tput clear' alias clear='vterm_printf "51;Evterm-clear-scrollback";tput clear'
alias man='vterm_cmd man' alias man='vterm_cmd man'
alias ediff='vterm_cmd ediff' alias ediff='vterm_cmd ediff'
alias ff='vterm_cmd find-file'
fi fi
# This is to change the title of the buffer based on information provided by the # This is to change the title of the buffer based on information provided by the