CDing into the project root can be accomplished with external tools, e.g. cd $(git rev-parse --show-toplevel) cd $(hg root) cd $(npm root) Any of which could be aliased. Also, +vterm/toggle and term/toggle define the PROOT environment variable, so `cd $PROOT` will work too. On the other hand, CDing to the current file/folder requires that the shell be made aware of the file/directory of some Emacs state, which is a little trickier to deal with, so I made that the default behavior for +term/toggle, +vterm/toggle and +eshell/toggle. |
||
---|---|---|
.. | ||
autoload.el | ||
config.el | ||
doctor.el | ||
packages.el | ||
README.org |
term/vterm
Description
This module provides a terminal emulator powered by libvterm. It is still in
alpha and requires a component be compiled (vterm-module.sh
).
The following commands are available to open it:
+vterm/toggle
(SPC o t
): Toggle vterm pop up window in the current project+vterm/here
(SPC o T
): Opens vterm in the current window
Module Flags
This module provides no flags.
Plugins
Prerequisites
- Emacs must be built with dynamic module support, i.e. compiled with the
--with-modules
option. - You need
libvterm
installed on your system. - You need
make
,cmake
and a C compiler such asgcc
so that vterm can buildvterm-module.so
.
Dynamic Module support
To check if your build of Emacs was built with dynamic module support, check
bin/doom info
for MODULES
next to "System features". If it's there, you're
good to go.
You can also check for --with-modules
in the system-configuration-options
variable (SPC h v system-configuration-options
).
- Archlinux or Manjaro users who installed Emacs through pacman will have support baked in.
-
MacOS users:
- If you use Emacs For Mac OS X, this option is enabled.
- If you use emacs-plus, this option is enabled by default.
- If you use emacs-mac, this options is not enabled by default. You may have
to reinstall emacs with the option:
brew install emacs-mac --with-modules
libvterm
- Ubuntu or Debian users:
apt-get install libvterm-dev
- ArchLinux or Manjaro:
pacman -S libvterm
- MacOS:
libvterm
Compilation tools for vterm-module.so
When you first load vterm, it will compile vterm-module.so
for you. For this
to succeed, you need the following:
make
cmake
- A C compiler like
gcc
- An internet connection (
cmake
will download needed libraries)
There are several ways to manually install the module:
- You can use
M-x vterm-module-compile
to let emacs automatically compile and install the module. WARNING: Emacs will hang during the compilation. It may take a while. -
You can compile and install the module yourself. Go to the vterm installation directory (usually
~/.emacs.d/.local/packages/elpa/vterm-<version>
) and run the following:mkdir -p build cd build cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. make
- You can also compile
vterm-module.sh
elsewhere, but the module must be moved/symlinked to~/.emacs.d/.local/packages/elpa/vterm-<version>/vterm-module.so
vterm-module.so
. Keep in mind that this folder will be deleted whenever the vterm package is updated.