vterm eval cmds, better 'emacs' iternally

This commit is contained in:
MitchMarq42 2022-06-25 10:57:03 -08:00
parent cd1096bb41
commit 07b35c65da

View File

@ -115,16 +115,25 @@
:config
(evil-collection-define-key 'insert 'vterm-mode-map
(kbd "C-w") 'evil-window-map)
(evil-collection-define-key 'normal 'vterm-mode-map
(kbd "RET") 'hkey-either)
(add-to-list 'vterm-keymap-exceptions
"C-w")
(add-to-list 'vterm-keymap-exceptions
"RET")
(setq mitch/vterm-eval-cmds-strings
'("update-pwd"
"restart-emacs"
"find-file-other-window"
"find-file-other-frame"))
(dolist (emacs-function mitch/vterm-eval-cmds-strings)
"find-file-other-frame"
"eshell/emacs"
"add-vterm-eval-cmd"))
(defun add-vterm-eval-cmd (function)
"Add FUNCTION to `vterm-eval-cmds' so it can be ran through sh in vterm."
(add-to-list 'vterm-eval-cmds
(list emacs-function (intern emacs-function))))
(list function (intern function))))
(dolist (emacs-function mitch/vterm-eval-cmds-strings)
(add-vterm-eval-cmd emacs-function))
:hook
(vterm-mode . mitch/terminal-setup)
(vterm-exit-functions . save-buffers-kill-terminal))
@ -519,6 +528,7 @@
(use-package eshell
:straight (:type built-in)
:hook (eshell-mode . mitch/terminal-setup)
:commands eshell/emacs
:config (require 'eshell-settings))
(use-package popper