From a3b0be161de944923736da090028fb6e55b63970 Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Sun, 16 May 2021 20:13:11 +0100 Subject: [PATCH] feat(emacs): improve vterm config This forces vterm buffers to be in the evil emacs state to basically disable evil-mode to make vterm function more like a native terminal emulator. I have also bound `C-o` to move to the previous buffer to simulate the jump backward functionality of evil-mode. This seams to be working better at the moment due to this always exiting the buffer. Sometimes jump back can move in the same buffer and this is not want we want when we are in a vterm buffer. --- site-modules/core/files/emacs/src/term.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/site-modules/core/files/emacs/src/term.el b/site-modules/core/files/emacs/src/term.el index 777cdf6..07e1b8e 100644 --- a/site-modules/core/files/emacs/src/term.el +++ b/site-modules/core/files/emacs/src/term.el @@ -8,11 +8,15 @@ (defun aa/term-init () ;; Hide the mode line in the terminal - (hide-mode-line-mode)) + (hide-mode-line-mode) + (evil-emacs-state) + (setq cursor-type 'bar)) (use-package vterm :quelpa (vterm :fetcher github :repo "akermu/emacs-libvterm") :commands (vterm) + :bind (:map vterm-mode-map + ("C-o" . previous-buffer)) :hook (vterm-mode . aa/term-init) :init (defvar vterm-install t)