summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/general.el20
1 files changed, 20 insertions, 0 deletions
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