Blob


1 # vmd.el
3 vmd is an Emacs package to interact with [OpenBSD' vmd][vmd].
5 ![vmd buffer with transient open](vmd.png)
7 In a `*vmd*` buffer (opened with `M-x vmd RET`), the following keys
8 are defined:
10 - `c`: (console) open a terminal connected to the vm at point
11 - `P`: pause the vm at point
12 - `s`: start the vm at point
13 - `S`: stop the vm at point
14 - `u`: unpause the vm at point
16 additionally, `x` will bring up a transient popup with the mnemonics
17 for the keys.
20 ### Customize the terminal for the console
22 To use vterm (or any other packages really) to handle a shell for the
23 console, `vmd-console-function` must point to a function that accepts
24 two parameters, name and cmd, and execute cmd (a list of strings) in
25 your preferred terminal. By default, `ansi-term` (bundled with Emacs)
26 is used, so it's easy to switch e.g. to vterm:
28 ```elisp
29 (defun my/vmd-vterm (name cmd)
30 (let ((vterm-shell (mapconcat #'shell-quote-argument cmd " "))
31 (vterm-buffer-name (concat "*" name "*")))
32 (vterm)))
33 (setq vmd-console-function #'my/vmd-vterm)
34 ```
37 [vmd]: http://man.openbsd.org/vmd