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.
This commit is contained in:
Ade Attwood 2021-05-16 20:13:11 +01:00
parent 4b71e6bc0e
commit a3b0be161d

View file

@ -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)