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