2019-05-18 23:41:18 -04:00
|
|
|
;;; term/vterm/config.el -*- lexical-binding: t; -*-
|
2019-01-27 03:45:29 +08:00
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! vterm
|
2022-08-12 20:07:08 +02:00
|
|
|
:when (featurep 'dynamic-modules)
|
2020-11-25 12:33:53 -05:00
|
|
|
:commands vterm-mode
|
2020-04-23 16:53:37 -04:00
|
|
|
:hook (vterm-mode . doom-mark-buffer-as-real-h)
|
|
|
|
:hook (vterm-mode . hide-mode-line-mode) ; modeline serves no purpose in vterm
|
2022-06-21 14:40:15 +02:00
|
|
|
:preface
|
2021-05-24 13:54:13 -04:00
|
|
|
;; HACK Because vterm clusmily forces vterm-module.so's compilation on us when
|
|
|
|
;; the package is loaded, this is necessary to prevent it when
|
|
|
|
;; byte-compiling this file (`use-package' blocks eagerly loads packages
|
|
|
|
;; when compiled).
|
|
|
|
(when noninteractive
|
|
|
|
(advice-add #'vterm-module-compile :override #'ignore)
|
|
|
|
(provide 'vterm-module))
|
|
|
|
|
2019-01-27 03:45:29 +08:00
|
|
|
:config
|
2021-04-10 19:15:11 +10:00
|
|
|
(set-popup-rule! "^\\*vterm" :size 0.25 :vslot -4 :select t :quit nil :ttl 0)
|
2019-02-18 18:56:20 -05:00
|
|
|
|
2023-09-11 13:14:49 +02:00
|
|
|
(map! :map vterm-mode-map "C-q" #'vterm-send-next-key)
|
|
|
|
|
2020-04-23 16:53:37 -04:00
|
|
|
;; Once vterm is dead, the vterm buffer is useless. Why keep it around? We can
|
|
|
|
;; spawn another if want one.
|
|
|
|
(setq vterm-kill-buffer-on-exit t)
|
|
|
|
|
2020-11-04 15:22:58 -05:00
|
|
|
;; 5000 lines of scrollback, instead of 1000
|
|
|
|
(setq vterm-max-scrollback 5000)
|
|
|
|
|
2020-01-12 20:05:26 -05:00
|
|
|
(setq-hook! 'vterm-mode-hook
|
2020-04-23 16:53:37 -04:00
|
|
|
;; Don't prompt about dying processes when killing vterm
|
2020-01-12 20:05:26 -05:00
|
|
|
confirm-kill-processes nil
|
|
|
|
;; Prevent premature horizontal scrolling
|
2021-01-30 17:57:45 -05:00
|
|
|
hscroll-margin 0))
|