From ffec3c2db5fb87528771b1b698a932c12ad862ad Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 6 Oct 2024 12:29:37 +0100 Subject: Install VTerm for Emacs --- Emacs/.config/emacs/config.org | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'Emacs') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 7af4102..1effb5b 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -2143,6 +2143,28 @@ thankfully. :after eshell :hook (eshell-mode-hook . eshell-syntax-highlighting-mode)) #+end_src +** VTerm +Sometimes Eshell doesn't cut it; it can't run certain TUI applications +easily, and if they don't have Emacs integration then you're out of +luck. Emacs comes by default with some terminal applications that can +run a system wide shell like SH or ZSH (~shell~ and ~term~ for +example), but they're not exactly great. ~vterm~ is an external +package using a shared library for terminal emulation, and is much +better than the default Emacs stuff. + +Since my ZSH configuration enables vim emulation, using ~evil~ on top +of it would lead to some weird states. Instead, use the Emacs state +so vim emulation is completely controlled by the shell. +#+begin_src emacs-lisp +(use-package vterm + :straight t + :general + (shell-leader + "v" #'vterm) + :init + (with-eval-after-load "evil" + (evil-set-initial-state 'vterm-mode 'emacs))) +#+end_src ** WAIT Elfeed :PROPERTIES: :header-args:emacs-lisp: :tangle no :results none -- cgit v1.2.3-13-gbd6f