diff --git a/emacs/init.org b/emacs/init.org index 9a83983..8de0d34 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -3996,3 +3996,19 @@ Spotify in Emacs! (setq ispell-program-name "hunspell" ispell-really-hunspell t)) #+END_SRC +* VTerm +A better terminal emulator for Emacs. Replaces ansi-term, not EShell. +#+BEGIN_SRC emacs-lisp + (use-package vterm + :if module-file-suffix + :commands (vterm vterm-other-window)) + + (defun open-vterm (&optional new-buffer) + (interactive "P") + (let ((buffer-name (when (not new-buffer) "vterm"))) + (if (and buffer-name (get-buffer buffer-name)) + (switch-to-buffer buffer-name) + (vterm buffer-name)))) + + (leader-def-key "sv" 'open-vterm) +#+END_SRC