doomemacs/modules/term/vterm/config.el

27 lines
926 B
EmacsLisp
Raw Normal View History

;;; term/vterm/config.el -*- lexical-binding: t; -*-
(use-package! vterm
:when (boundp 'module-file-suffix)
2020-03-04 17:17:47 -05:00
:commands (vterm vterm-mode)
:preface (setq vterm-install t)
:config
2019-02-18 18:56:20 -05:00
(set-popup-rule! "^vterm" :size 0.25 :vslot -4 :select t :quit nil :ttl 0)
(setq-hook! 'vterm-mode-hook
;; Don't prompt about processes when killing vterm
confirm-kill-processes nil
;; Prevent premature horizontal scrolling
hscroll-margin 0)
2020-01-31 03:04:04 -05:00
(setq vterm-kill-buffer-on-exit t)
(when (featurep! :editor evil)
2020-02-22 21:42:04 -05:00
(add-hook! 'vterm-mode-hook
(defun +vterm-init-remember-point-h ()
(add-hook 'evil-insert-state-exit-hook #'+vterm-remember-insert-point-h nil t)
(add-hook 'evil-insert-state-entry-hook #'+vterm-goto-insert-point-h nil t))))
(add-hook 'vterm-mode-hook #'doom-mark-buffer-as-real-h)
;; Modeline serves no purpose in vterm
(add-hook 'vterm-mode-hook #'hide-mode-line-mode))