feat(emacs): add command for opening terminal emulator
This commit is contained in:
parent
03b968dcb0
commit
cc031160ad
1 changed files with 13 additions and 1 deletions
|
@ -57,6 +57,17 @@
|
||||||
(unless (string-empty-p selected-term-buffer)
|
(unless (string-empty-p selected-term-buffer)
|
||||||
(switch-to-buffer selected-term-buffer))))
|
(switch-to-buffer selected-term-buffer))))
|
||||||
|
|
||||||
|
(defun priime-terminal-emulator ()
|
||||||
|
"Open $TERM in the current project or current directory."
|
||||||
|
(interactive)
|
||||||
|
(let ((target-dir (or (projectile-project-root)
|
||||||
|
(file-name-directory (buffer-file-name)))))
|
||||||
|
(priime--open-terminal-emulator target-dir)))
|
||||||
|
|
||||||
|
(defun priime--open-terminal-emulator (dir)
|
||||||
|
"Open a terminal at DIR."
|
||||||
|
(start-process "*terminal*" nil "alacritty" "--working-directory" dir))
|
||||||
|
|
||||||
(use-package projectile :straight t
|
(use-package projectile :straight t
|
||||||
:custom
|
:custom
|
||||||
(projectile-completion-system 'auto)
|
(projectile-completion-system 'auto)
|
||||||
|
@ -78,7 +89,8 @@
|
||||||
:custom (vterm-shell (or (executable-find "fish") shell-file-name))
|
:custom (vterm-shell (or (executable-find "fish") shell-file-name))
|
||||||
:bind (("C-c v" . priime-terminal)
|
:bind (("C-c v" . priime-terminal)
|
||||||
("<f8>" . priime-split-terminal)
|
("<f8>" . priime-split-terminal)
|
||||||
("C-<f8>" . priime-find-terminal)))
|
("C-<f8>" . priime-find-terminal)
|
||||||
|
("C-c V" . priime-terminal-emulator)))
|
||||||
(use-package rg :straight t)
|
(use-package rg :straight t)
|
||||||
(use-package anzu :straight t
|
(use-package anzu :straight t
|
||||||
:bind ("C-c r a" . anzu-query-replace-regexp)
|
:bind ("C-c r a" . anzu-query-replace-regexp)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue