akermu / emacs-libvterm

Emacs libvterm integration
GNU General Public License v3.0
1.69k stars 135 forks source link

Enable `C-u` when calling `vterm` #659

Open ZelphirKaltstahl opened 1 year ago

ZelphirKaltstahl commented 1 year ago

Thanks for making vterm! It is quite useful!

One more thing that could make using vterm easier is to enable the C-u (I think it is called universal argument), when one calls vterm. Other shells in Emacs use this argument to give the resulting buffer a name. I often find myself doing the following:

  1. M-x vterm RET
  2. M-x rename-buffer RET
  3. *some-name-shell* RET

Instead the flow could be shorter, if C-u was enabled:

  1. C-u M-x vterm RET
  2. *some-name-shell* RET

What do you think about this?

ZelphirKaltstahl commented 1 year ago

I found this: https://github.com/akermu/emacs-libvterm/issues/505 and now wrote my own:

(defun myvterm (&optional buffer-name)
  "Redefine `vterm` to take a universal argument BUFFER-NAME."
  (interactive "BBuffer name: ")
  (vterm buffer-name))

Still a bit more to type than just vterm, but I think I can live with this.