1.4 KiB
Emacs also has the functionality to run a terminal environment. While many other terminals will try to have similar capabilities with keybindings, nothing matches just integrating your terminal in emacs.
VTerm
VTerm is a terminal emulator written in C. While emacs has a few built-in terminal all of them either lack speed or are missing many escape sequences.
(use-package vterm
:config
(setq vterm-max-scrollback 10000)
; Fixes vterm issue with cursor not updating
(advice-add #'vterm--redraw :after (lambda (&rest args) (evil-refresh-cursor evil-state))))
There are a few packages that you need to install in order to use VTerm.
sudo apt install cmake libtool-bin
Multi-Vterm
Multi-vterm is a package that adds the capability to easily create multiple vterm terminal buffers without having to manually rename them each time.
(use-package multi-vterm
:after vterm)
Change Terminal Font
When using zsh with powerlevel10k, the MesloLGS NF
font is required to make the prompt align properly. Due to this, this code is implemented to change the font only when VTerm is being used.
(add-hook 'vterm-mode-hook
(lambda ()
(set (make-local-variable 'buffer-face-mode-face) '(:family "MesloLGS NF" :height 135))
(buffer-face-mode t)))