emacs-vterm-manager icon indicating copy to clipboard operation
emacs-vterm-manager copied to clipboard

Manages vterm buffers with configuration files.

#+TITLE: README [[https://melpa.org/#/vtm][file:https://melpa.org/packages/vtm-badge.svg]]

  • About ~vtm~ manages ~vterm~ buffers with configuration files.

Especially useful when sshing to many hosts simultaneously.

#+CAPTION: vtm [[./screenshots/vtm.gif]]

  • Features
  1. Name of the vterm buffer can be explicitly specified by configuration or implicitly infered from configuration file name. So users can switch between different vterm buffer easily.
  2. Multiple strings can be sent to vterm buffer by configuration.
  3. Control characters can be sent to vterm buffer by configuration.
  4. Time to sleep before sending string or control characters can be specified by configuration.
  • Install Just install ~vtm~ from ~melpa~.

  • Usage

  1. Create a /.vtm/ file (e.g. /host.vtm/), ~vtm~ will populate it with an example config.
  2. Edit the /.vtm/ file as your wish, then close the buffer.
  3. Open the /.vtm/ file like a normal file, a ~vterm~ buffer will be opened instead.
  4. Toggle ~vtm-edit-mode~ to switch between editing the /.vtm/ file and openning the ~vterm~ buffer.

Example /.vtm/ file #+BEGIN_SRC lisp ( ;; Buffer key name, default to "" (filename). :name ""

;; Commands to send, default to nil. :commands (

;; First command. ( ;; Sleep before command, default to 0. :sleep 0 ;; String to send, default to "". :string "" ;; Additional control character to send. ;; Possible values: ;; - "key" in command ~vterm-send-{key}~: send ~key~ ;; - "": send ~return~. ;; - nil: do not send control character. ;; Default to "" (send ~return~). :control "" )

;; ;; Second command. ;; (:sleep 0 :string "" :control "")

;; ;; Third command. ;; (:string "")

)) #+END_SRC

  • Variables and commands | Variable | Description | Default | |----------------------+------------------------------------------+---------| | ~vtm-prefix-string~ | Prefix string of the vterm buffer name. | ~>~ | | ~vtm-postfix-string~ | Postfix string of the vterm buffer name. | ~~ | |----------------------+------------------------------------------+---------|