33# Introduction
44
55Emacs-libvterm (_ vterm_ ) is fully-fledged terminal emulator inside GNU Emacs
6- based on [ libvterm] ( https://github.com/neovim/libvterm ) , a C library. As a
6+ based on [ ` libvterm ` ] ( https://github.com/neovim/libvterm ) , a C library. As a
77result of using compiled code (instead of elisp), emacs-libvterm is fully
88capable, fast, and it can seamlessly handle large outputs.
99
@@ -45,9 +45,10 @@ For the long answer, let us discuss the differences between `eshell`, `shell`,
4545 ` vterm ` outperforms ` term ` and has a nearly universal compatibility with
4646 terminal applications.
4747
48- Vterm is not for you [ if you are using Windows] ( https://github.com/akermu/emacs-libvterm/issues/12 ) , or if you cannot set up Emacs
49- with support for modules. Otherwise, you should try vterm, as it provides a
50- superior terminal experience in Emacs.
48+ Vterm is not for you [ if you are using
49+ Windows] ( https://github.com/akermu/emacs-libvterm/issues/12 ) , or if you cannot
50+ set up Emacs with support for modules. Otherwise, you should try vterm, as it
51+ provides a superior terminal experience in Emacs.
5152
5253Using ` vterm ` is like using Gnome Terminal inside Emacs: Vterm is fully-featured
5354and fast, but is not as well integrated in Emacs as ` eshell ` (yet), so some of
@@ -85,7 +86,7 @@ a normal package. If the requirements are satisfied (mainly, Emacs was built
8586with support for modules), ` vterm ` will compile the module the first time it is
8687run. This is the recommended way to install ` vterm ` .
8788
88- ` vterm ` can be install from MELPA with ` use-package ` by adding the following
89+ ` vterm ` can be installed from MELPA with ` use-package ` by adding the following
8990lines to your ` init.el ` :
9091
9192``` elisp
@@ -105,8 +106,8 @@ Clone the repository:
105106git clone https://github.com/akermu/emacs-libvterm.git
106107```
107108
108- By default, vterm will try to find if libvterm is installed. If it is not found,
109- emacs-libvterm will download the latest version available of libvterm (from
109+ By default, vterm will try to find if ` libvterm ` is installed. If it is not found,
110+ emacs-libvterm will download the latest version available of ` libvterm ` (from
110111[ here] ( https://github.com/neovim/libvterm ) ), compile it, and use it. If you
111112always want to use the vendored version as opposed to the one on you system, set
112113` USE_SYSTEM_LIBVTERM ` to ` no ` . To do this, change ` cmake .. ` with `cmake
@@ -139,18 +140,20 @@ Or, with `use-package`:
139140## vterm and Ubuntu
140141### 20.04
141142Using ` vterm ` on Ubuntu requires additional steps. The latest LTS version
142- (20.04) ships without CMake installed and Emacs27 is not yet available from Ubuntu's package repository.
143+ (20.04) ships without CMake installed and Emacs27 is not yet available from
144+ Ubuntu's package repository.
143145
144146The basic steps for getting vterm to work on Ubuntu 20.04 are:
145147* Ensure Emacs27 is installed
146- * Install cmake, libtool, and libtool-bin
148+ * Install ` cmake ` , ` libtool ` , and ` libtool-bin `
147149
148150There are a few options for installing Emacs27 on Ubuntu 20.04:
149151* Compile Emacs27 from source
150152* Install Emacs27 from Snap
151153* Install Emacs27 from Kevin Kelley's PPA
152154
153- In any case, if you have an older Emacs version you will need to purge it before proceeding:
155+ In any case, if you have an older Emacs version you will need to purge it before
156+ proceeding:
154157
155158#### Purge Emacs
156159
@@ -198,9 +201,9 @@ sudo apt install libtool-bin
198201
199202### 18.04
200203
201- Using `vterm` on Ubuntu 18.04 requires additional steps.
202- 18.04 ships with a version of CMake that is too old for `vterm` and GNU
203- Emacs is not compiled with support for dynamical module loading.
204+ Using `vterm` on Ubuntu 18.04 requires additional steps. 18.04 ships with a
205+ version of CMake that is too old for `vterm` and GNU Emacs is not compiled with
206+ support for dynamical module loading.
204207
205208It is possible to install GNU Emacs with module support from Kevin Kelley' s PPA.
206209The binary in Ubuntu Emacs Lisp PPA is currently broken and leads to segmentation faults
@@ -228,7 +231,7 @@ to work (see,
228231Pull requests to improve support for Ubuntu are welcome (e.g., simplifying the
229232installation).
230233
231- Some releases of Ubuntu (e.g., 18.04) ship with a old version of libvterm that
234+ Some releases of Ubuntu (e.g., 18.04) ship with a old version of ` libvterm` that
232235can lead to compilation errors. If you have this problem, see the
233236[FAQ](# frequently-asked-questions-and-problems) for a solution.
234237
@@ -369,9 +372,9 @@ Shell to run in a new vterm. It defaults to `$SHELL`.
369372
370373# # `vterm-environment`
371374
372- to add more environment variables there is the custom vterm-environment which has
373- a similar format than the internal Emacs variable process-environment.
374- You can check the documentation with C-h v process-environment for more details.
375+ To add more environment variables there is the custom ` vterm-environment` which
376+ has a similar format to the internal Emacs variable ` process-environment` . You
377+ can check the documentation with ` C-h v process-environment` for more details.
375378
376379# # `vterm-term-environment-variable`
377380
@@ -390,8 +393,8 @@ need to copy or manipulate the content.
390393
391394Compilation flags and arguments to be given to CMake when compiling the module.
392395This string is directly passed to CMake, so it uses the same syntax. At the
393- moment, it main use is for compiling vterm using the system libvterm instead of
394- the one downloaded from GitHub. You can find all the arguments and flags
396+ moment, its main use is for compiling vterm using the system ` libvterm` instead
397+ of the one downloaded from GitHub. You can find all the arguments and flags
395398available with ` cmake -LA` in the build directory.
396399
397400# # `vterm-copy-exclude-prompt`
@@ -412,21 +415,24 @@ the vterm prompt tracking, if false it use the regexp in
412415
413416Vterm support copy text to Emacs kill ring and system clipboard by using OSC 52.
414417See https://invisible-island.net/xterm/ctlseqs/ctlseqs.html for more info about OSC 52.
415- For example: send ' blabla' to kill ring: printf " \033]52;c;$( printf " %s" " blabla" | base64) \a"
418+ For example: send ` " blabla" ` to kill ring: ` printf " \033]52;c;$( printf " %s" " blabla" | base64) \a" `
416419
417- tmux can share its copy buffer to terminals by supporting osc52(like iterm2 xterm),
418- you can enable this feature for tmux by :
420+ tmux can share its copy buffer to terminals by supporting OSC 52 (like iterm2
421+ and xterm), you can enable this feature for tmux by:
422+
423+ ` ` `
419424set -g set-clipboard on # osc 52 copy paste share with iterm
420425set -ga terminal-overrides ',xterm*:XT:Ms=\E]52;%p1%s;%p2%s\007'
421426set -ga terminal-overrides ',screen*:XT:Ms=\E]52;%p1%s;%p2%s\007'
427+ ` ` `
422428
423429The clipboard querying/clearing functionality offered by OSC 52 is not implemented here,
424- And for security reason, this feature is disabled by default."
430+ And for security reason, this feature is disabled by default.
425431
426- This feature need the new way of handling strings with a struct ` VTermStringFragment `
427- in libvterm. You'd better compile emacs-libvterm with ` cmake -DUSE_SYSTEM_LIBVTERM=no .. ` .
428- If you don't do that, when the content you want to copied is too long, it would be truncated
429- by bug of libvterm.
432+ This feature needs the new way of handling strings with a struct
433+ ` VTermStringFragment ` in ` libvterm` . You' d better compile ` emacs-libvterm` with
434+ `cmake -DUSE_SYSTEM_LIBVTERM=no ..`. If you don' t do that, when the content you
435+ want to copy is too long, it would be truncated by a bug in ` libvterm` .
430436
431437# # `vterm-buffer-name-string`
432438
@@ -437,7 +443,7 @@ below). A possible value for `vterm-buffer-name-string` is `vterm %s`, according
437443to which all the vterm buffers will be named " vterm TITLE" .
438444
439445This requires some shell-side configuration to print the title. For example to
440- set the name " HOSTNAME:PWD" , use can you the following:
446+ set the name " HOSTNAME:PWD" , you can use the following:
441447
442448For ` zsh` ,
443449
@@ -477,10 +483,10 @@ avoid this question and always compile the module, set
477483When not-nil fake newlines are removed on entering copy mode.
478484vterm inserts fake-newlines purely for rendering. When using
479485` vterm-copy-mode` these are in conflict with many emacs functions
480- like isearch-forward. if this varialbe is not-nil the
486+ like ` isearch-forward` . if this variable is not-nil the
481487fake-newlines are removed on entering copy-mode and re-inserted
482- on leaving copy mode. Also truncate-lines is set to t on entering
483- copy-mode and set to nil on leaving.
488+ on leaving copy mode. Also ` truncate-lines` is set to ` t ` on entering
489+ copy-mode and set to ` nil` on leaving.
484490
485491# # `vterm-tramp-shells`
486492
@@ -490,10 +496,10 @@ This has to be a list of pairs of the format:
490496` (TRAMP-METHOD SHELL)`
491497
492498The ` TRAMP-METHOD` is a method string as used by tramp (e.g., ` " ssh" ` ).
493- Use t as ` TRAMP-METHOD` to specify a default shell for all methods.
499+ Use ` t ` as ` TRAMP-METHOD` to specify a default shell for all methods.
494500Specific methods always take precedence over ` t` .
495501
496- Set SHELL to ` ' login-shell` to use the user' s login shell on the remote host.
502+ Set ` SHELL` to ` ' login-shell` to use the user' s login shell on the remote host.
497503The login-shell detection currently works for POSIX-compliant remote hosts that
498504have the ` getent` command (regular GNU/Linux distros, * BSDs, but not MacOS X
499505unfortunately).
@@ -504,7 +510,7 @@ If no second `SHELL` command is specified with `'login-shell`, vterm will
504510fall back to tramp' s shell.
505511
506512Examples:
507- - Usee the default login shell for all methods, except for docker.
513+ - Use the default login shell for all methods, except for docker.
508514 `' (( t login- shell) ("docker" "/ bin/ sh")) `
509515- Use the default login shell for ssh and scp, fall back to " /bin/bash" .
510516 Use tramp' s default shell for all other methods.
@@ -552,15 +558,16 @@ reverse video) setting the relative option to `t` (`vterm-disable-bold`,
552558
553559You can use another font for vterm buffer
554560
555- ` ` ` elisp
561+ ` ` ` elisp
556562(add-hook ' vterm-mode-hook
557563 (lambda ()
558564 (set (make-local-variable ' buffer-face-mode-face) ' (:family "IosevkaTerm Nerd Font"))
559565 (buffer-face-mode t))
560566```
561567## Blink cursor
562568
563- When `vterm-ignore-blink-cursor` is `t`, vterm will ignore request from application to turn on or off cursor blink.
569+ When `vterm-ignore-blink-cursor` is `t`, vterm will ignore request from
570+ application to turn on or off cursor blink.
564571
565572If `nil`, cursor in any window may begin to blink or not blink because `blink-cursor-mode`
566573is a global minor mode in Emacs, you can use `M-x blink-cursor-mode` to toggle.
@@ -596,9 +603,9 @@ result, interactive functions that ask for a path or a file (e.g., `dired` or
596603`find-file`) will do so starting from the current location.
597604
598605And `vterm` supports _prompt tracking_. If this feature is enabled, Emacs knows
599- where the prompt ends, you needn' t customize ` term-prompt-regexp` any more.
600- Then you can use ` vterm-next-prompt` and ` vterm-previous-prompt`
601- moving to end of next/previous prompt. The default keybinding is ` C-c C-n` and ` C-c C-p` .
606+ where the prompt ends, you needn' t customize ` term-prompt-regexp` any more. Then
607+ you can use ` vterm-next-prompt` and ` vterm-previous-prompt` moving to end of
608+ next/previous prompt. The default keybinding is ` C-c C-n` and ` C-c C-p` .
602609
603610And ` vterm-beginning-of-line` would move the point to the first character after the
604611shell prompt on this line. If the point is already there, move to the beginning of the line.
@@ -816,8 +823,8 @@ There is an option for that: set `vterm-kill-buffer-on-exit` to `t`.
816823
817824The version of ` libvterm` installed on your system is too old. You should let
818825` emacs-libvterm` download ` libvterm` for you. You can either uninstall your
819- libvterm, or instruct Emacs to ignore the system libvterm. If you are compiling
820- from Emacs, you can do this by setting:
826+ ` libvterm` , or instruct Emacs to ignore the system ` libvterm` . If you are
827+ compiling from Emacs, you can do this by setting:
821828
822829` ` ` elisp
823830(setq vterm-module-cmake-args " -DUSE_SYSTEM_LIBVTERM=no" )
0 commit comments