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