diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2022-08-21 03:03:56 +0200 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2022-08-21 03:03:56 +0200 |
commit | 8264114f82179029e41bb4b62269768d8b692791 (patch) | |
tree | 128a7a04c5f37cd70f03ecec5e07f45e17ae2788 /Emacs.org | |
parent | 2b1d218c6db8a1dea28f076510ed0f58ca54f432 (diff) | |
download | dotfiles-8264114f82179029e41bb4b62269768d8b692791.tar.gz dotfiles-8264114f82179029e41bb4b62269768d8b692791.zip |
Emacs: Add jd/open-new-vterm
Diffstat (limited to 'Emacs.org')
-rw-r--r-- | Emacs.org | 27 |
1 files changed, 10 insertions, 17 deletions
@@ -639,20 +639,15 @@ | |||
639 | 639 | ||
640 | #+begin_src emacs-lisp | 640 | #+begin_src emacs-lisp |
641 | 641 | ||
642 | (use-package vterm) | 642 | (defun jd/open-new-vterm () |
643 | (use-package vterm-toggle | 643 | (interactive) |
644 | :init | 644 | (let ((buffer-name (generate-new-buffer-name vterm-buffer-name))) |
645 | (setq vterm-toggle-fullscreen-p nil) | 645 | (switch-to-buffer buffer-name) |
646 | (vterm-mode))) | ||
647 | |||
648 | (use-package vterm | ||
646 | :config | 649 | :config |
647 | (add-to-list 'display-buffer-alist | 650 | (setq vterm-buffer-name "vterm")) |
648 | '((lambda (buffer-or-name _) | ||
649 | (let ((buffer (get-buffer buffer-or-name))) | ||
650 | (with-current-buffer buffer | ||
651 | (or (equal major-mode 'vterm-mode) | ||
652 | (string-prefix-p vterm-buffer-name (buffer-name buffer)))))) | ||
653 | (display-buffer-reuse-window display-buffer-at-bottom) | ||
654 | (reusable-frames . visible) | ||
655 | (window-height . 0.3)))) | ||
656 | 651 | ||
657 | #+end_src | 652 | #+end_src |
658 | 653 | ||
@@ -661,12 +656,10 @@ | |||
661 | #+begin_src emacs-lisp | 656 | #+begin_src emacs-lisp |
662 | 657 | ||
663 | (jd/leader-key-def | 658 | (jd/leader-key-def |
664 | "oT" '(vterm :which-key "Open terminal in current window") | 659 | "ot" '(jd/open-new-vterm :which-key "Open terminal in current window")) |
665 | "ot" '(vterm-toggle :which-key "Toggle terminal")) | 660 | |
666 | |||
667 | #+end_src | 661 | #+end_src |
668 | 662 | ||
669 | |||
670 | ** Dired | 663 | ** Dired |
671 | 664 | ||
672 | #+begin_src emacs-lisp | 665 | #+begin_src emacs-lisp |