vterm eval cmds, better 'emacs' iternally
This commit is contained in:
parent
cd1096bb41
commit
07b35c65da
@ -115,16 +115,25 @@
|
|||||||
:config
|
:config
|
||||||
(evil-collection-define-key 'insert 'vterm-mode-map
|
(evil-collection-define-key 'insert 'vterm-mode-map
|
||||||
(kbd "C-w") 'evil-window-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
|
(add-to-list 'vterm-keymap-exceptions
|
||||||
"C-w")
|
"C-w")
|
||||||
|
(add-to-list 'vterm-keymap-exceptions
|
||||||
|
"RET")
|
||||||
(setq mitch/vterm-eval-cmds-strings
|
(setq mitch/vterm-eval-cmds-strings
|
||||||
'("update-pwd"
|
'("update-pwd"
|
||||||
"restart-emacs"
|
"restart-emacs"
|
||||||
"find-file-other-window"
|
"find-file-other-window"
|
||||||
"find-file-other-frame"))
|
"find-file-other-frame"
|
||||||
(dolist (emacs-function mitch/vterm-eval-cmds-strings)
|
"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
|
(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
|
:hook
|
||||||
(vterm-mode . mitch/terminal-setup)
|
(vterm-mode . mitch/terminal-setup)
|
||||||
(vterm-exit-functions . save-buffers-kill-terminal))
|
(vterm-exit-functions . save-buffers-kill-terminal))
|
||||||
@ -519,6 +528,7 @@
|
|||||||
(use-package eshell
|
(use-package eshell
|
||||||
:straight (:type built-in)
|
:straight (:type built-in)
|
||||||
:hook (eshell-mode . mitch/terminal-setup)
|
:hook (eshell-mode . mitch/terminal-setup)
|
||||||
|
:commands eshell/emacs
|
||||||
:config (require 'eshell-settings))
|
:config (require 'eshell-settings))
|
||||||
|
|
||||||
(use-package popper
|
(use-package popper
|
||||||
|
Loading…
Reference in New Issue
Block a user