summaryrefslogtreecommitdiffstats
path: root/Emacs.org
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2022-08-21 03:03:56 +0200
committerjdlugosz963 <jdlugosz963@gmail.com>2022-08-21 03:03:56 +0200
commit8264114f82179029e41bb4b62269768d8b692791 (patch)
tree128a7a04c5f37cd70f03ecec5e07f45e17ae2788 /Emacs.org
parent2b1d218c6db8a1dea28f076510ed0f58ca54f432 (diff)
downloaddotfiles-8264114f82179029e41bb4b62269768d8b692791.tar.gz
dotfiles-8264114f82179029e41bb4b62269768d8b692791.zip
Emacs: Add jd/open-new-vterm
Diffstat (limited to 'Emacs.org')
-rw-r--r--Emacs.org27
1 files changed, 10 insertions, 17 deletions
diff --git a/Emacs.org b/Emacs.org
index 2f25171..c7a67bc 100644
--- a/Emacs.org
+++ b/Emacs.org
@@ -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