Add vterm layer
vterm layer uses emacs-libvterm for terminal support
This commit is contained in:
parent
7ca2b42d2b
commit
424c358786
8 changed files with 134 additions and 0 deletions
29
modules/emacs/vterm/autoload.el
Normal file
29
modules/emacs/vterm/autoload.el
Normal file
|
@ -0,0 +1,29 @@
|
|||
;;; emacs/vterm/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +vterm/open (arg)
|
||||
"Open a terminal buffer in the current window. If ARG (universal argument) is
|
||||
non-nil, cd into the current project's root."
|
||||
(interactive "P")
|
||||
(let ((default-directory
|
||||
(if arg
|
||||
(or (doom-project-root) default-directory)
|
||||
default-directory)))
|
||||
(switch-to-buffer (save-window-excursion (vterm)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +vterm/open-popup (arg)
|
||||
"Open a terminal popup window. If ARG (universal argument) is
|
||||
non-nil, cd into the current project's root."
|
||||
(interactive "P")
|
||||
(let ((default-directory
|
||||
(if arg
|
||||
(or (doom-project-root) default-directory)
|
||||
default-directory)))
|
||||
(pop-to-buffer (save-window-excursion (vterm)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +vterm/open-popup-in-project ()
|
||||
"Open a terminal popup window in the root of the current project."
|
||||
(interactive)
|
||||
(+vterm/open-popup t))
|
Loading…
Add table
Add a link
Reference in a new issue