From a20cfa665920d15aa51237752df4155b4f71b5ce Mon Sep 17 00:00:00 2001 From: Mars Date: Sat, 12 Oct 2024 19:41:12 -0400 Subject: [PATCH] vterm --- config.org | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config.org b/config.org index 4f2e60e..f669619 100644 --- a/config.org +++ b/config.org @@ -188,6 +188,13 @@ (setq-default whitespace-action '(cleanup auto-cleanup)) + (defun my/vterm-toggle-project-root () + "Open or toggle vterm at the project root." + (interactive) + (let ((default-directory (or (project-root (project-current)) + default-directory))) + (vterm-toggle))) + (use-package general :ensure t :config @@ -195,7 +202,7 @@ :states '(normal visual emacs) :keymaps 'override "K" '(eldoc-box-help-at-point :wk "Hover") - "C-t" '(vterm-toggle :wk "Toggle VTerm"))) + "C-t" '(my/vterm-toggle-project-root :wk "Toggle VTerm"))) (use-package evil-collection :ensure t