mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 23:49:56 +00:00
Refactor multi-vterm launch commands
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
|
||||
;; -------- vterm --------
|
||||
(autoload 'multi-vterm "multi-vterm" nil t)
|
||||
(define-key fscotto/open (kbd "T") #'multi-vterm)
|
||||
(define-key fscotto/open (kbd "T") #'fscotto/home-multi-vterm)
|
||||
|
||||
(with-eval-after-load 'vterm
|
||||
(define-key vterm-mode-map (kbd "C-c C-t") #'vterm-copy-mode))
|
||||
|
||||
@@ -23,11 +23,20 @@
|
||||
(let ((default-directory (fscotto/project-root)))
|
||||
(vterm)))
|
||||
|
||||
(defun fscotto/open-multi-vterm-in (directory)
|
||||
"Open a new multi-vterm buffer in DIRECTORY."
|
||||
(let ((default-directory (file-name-as-directory directory)))
|
||||
(multi-vterm)))
|
||||
|
||||
(defun fscotto/home-multi-vterm ()
|
||||
"Open a new multi-vterm buffer in HOME."
|
||||
(interactive)
|
||||
(fscotto/open-multi-vterm-in (expand-file-name "~/")))
|
||||
|
||||
(defun fscotto/project-multi-vterm ()
|
||||
"Open a new multi-vterm buffer in project root."
|
||||
(interactive)
|
||||
(let ((default-directory (fscotto/project-root)))
|
||||
(multi-vterm)))
|
||||
(fscotto/open-multi-vterm-in (fscotto/project-root)))
|
||||
|
||||
(defun fscotto/launch-external-terminal (&optional command)
|
||||
"Launch external terminal in project root, optionally running COMMAND."
|
||||
|
||||
Reference in New Issue
Block a user