akermu / emacs-libvterm

Emacs libvterm integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enable `C-u` when calling `vterm`

ZelphirKaltstahl opened this issue · comments

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?

I found this: #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.