jixiuf / vterm-toggle

toggles between the vterm buffer and whatever buffer you are editing.
GNU General Public License v3.0
189 stars 12 forks source link

vterm-toggle doesn't kill buffer after exit #17

Closed bangedorrunt closed 4 years ago

bangedorrunt commented 4 years ago

I'm following the instruction and have vterm opened in bottom window with

(setq vterm-toggle-fullscreen-p nil)
(add-to-list 'display-buffer-alist
             '((lambda(bufname _) (with-current-buffer bufname (equal major-mode 'vterm-mode)))
                (display-buffer-reuse-window display-buffer-at-bottom)
                ;;(display-buffer-reuse-window display-buffer-in-direction)
                ;;display-buffer-in-direction/direction/dedicated is added in emacs27
                ;;(direction . bottom)
                ;;(dedicated . t) ;dedicated is supported in emacs27
                (reusable-frames . visible)
                (window-height . 0.3)))

However, when I exit vterm, the buffer window still remains, I have to manually close that buffer and that is not what I want. I also add vterm-kill-buffer-on-exit but it has no effect.

jixiuf commented 4 years ago

try

(setq vterm-toggle-reset-window-configration-after-exit t)
bangedorrunt commented 4 years ago

@jixiuf, many thanks, that fixed the issue!