fix(emacs): create and use new priime-terminal
command
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
9656d6f422
commit
c104699523
1 changed files with 9 additions and 4 deletions
|
@ -26,13 +26,18 @@
|
||||||
(write-file file-path)
|
(write-file file-path)
|
||||||
(find-file (expand-file-name file-path))))
|
(find-file (expand-file-name file-path))))
|
||||||
|
|
||||||
|
(defun priime-terminal ()
|
||||||
|
"Open a terminal in the current project or current directory."
|
||||||
|
(interactive)
|
||||||
|
(if (projectile-project-p)
|
||||||
|
(projectile-run-vterm)
|
||||||
|
(vterm)))
|
||||||
|
|
||||||
(defun priime-split-terminal ()
|
(defun priime-split-terminal ()
|
||||||
"Split a terminal on the right and move to it."
|
"Split a terminal on the right and move to it."
|
||||||
(interactive)
|
(interactive)
|
||||||
(priime-split-right)
|
(priime-split-right)
|
||||||
(if (projectile-project-p)
|
(priime-terminal)
|
||||||
(projectile-run-vterm)
|
|
||||||
(vterm))
|
|
||||||
(balance-windows))
|
(balance-windows))
|
||||||
|
|
||||||
(use-package projectile :straight t
|
(use-package projectile :straight t
|
||||||
|
@ -54,7 +59,7 @@
|
||||||
(use-package no-littering :straight t)
|
(use-package no-littering :straight t)
|
||||||
(use-package vterm :straight t
|
(use-package vterm :straight t
|
||||||
:custom (vterm-shell (or (executable-find "fish") shell-file-name))
|
:custom (vterm-shell (or (executable-find "fish") shell-file-name))
|
||||||
:bind (("C-c v" . vterm)
|
:bind (("C-c v" . priime-terminal)
|
||||||
("<f8>" . priime-split-terminal)))
|
("<f8>" . priime-split-terminal)))
|
||||||
(use-package rg :straight t)
|
(use-package rg :straight t)
|
||||||
(use-package anzu :straight t
|
(use-package anzu :straight t
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue