From cc2dc076d8015152b64ebb83c7bd07fb2cf70912 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Sat, 15 Oct 2022 19:44:49 -0400 Subject: Adding vterm and a toggle function --- lisp/general.el | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lisp') diff --git a/lisp/general.el b/lisp/general.el index 00c0a76..89c60b4 100644 --- a/lisp/general.el +++ b/lisp/general.el @@ -164,5 +164,25 @@ ) +;; Vterm +(require 'vterm) +(require 'vterm-toggle) +(setq vterm-toggle-fullscreen-p nil) +(add-to-list 'display-buffer-alist + '((lambda (buffer-or-name _) + (let ((buffer (get-buffer buffer-or-name))) + (with-current-buffer buffer + (or (equal major-mode 'vterm-mode) + (string-prefix-p vterm-buffer-name (buffer-name buffer)))))) + (display-buffer-reuse-window display-buffer-at-bottom) + ;;(display-buffer-reuse-window display-buffer-in-direction) + ;;display-buffer-in-direction/direction/dedicated is added in emacs27 + ;;(direction . bottom) + ;;(dedicated . t) ;dedicated is supported in emacs27 + (reusable-frames . visible) + (window-height . 0.3))) +(bind-key* (kbd "M-t") 'vterm-toggle) + + (provide 'general) ;;; general.el ends here -- cgit v1.2.1