tools/vterm: update README
This commit is contained in:
parent
f0fe71892b
commit
a6d4341a95
2 changed files with 91 additions and 94 deletions
91
modules/tools/vterm/README.org
Normal file
91
modules/tools/vterm/README.org
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
#+TITLE: tools/vterm
|
||||||
|
#+DATE: January 16, 2019
|
||||||
|
#+SINCE: 2.1
|
||||||
|
#+STARTUP: inlineimages
|
||||||
|
|
||||||
|
* Table of Contents :TOC_3:noexport:
|
||||||
|
- [[#description][Description]]
|
||||||
|
- [[#module-flags][Module Flags]]
|
||||||
|
- [[#plugins][Plugins]]
|
||||||
|
- [[#prerequisites][Prerequisites]]
|
||||||
|
- [[#dynamic-module-support][Dynamic Module support]]
|
||||||
|
- [[#libvterm][libvterm]]
|
||||||
|
- [[#compilation-tools-for-vterm-moduleso][Compilation tools for vterm-module.so]]
|
||||||
|
|
||||||
|
* 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/open~ (=SPC o t=): Opens vterm in the current window.
|
||||||
|
+ ~+vterm/open-popup~ (no keybind): Opens vterm in a pop up window.
|
||||||
|
+ ~+vterm/open-popup-in-project~ (=SPC o T=): Opens vterm from the project root
|
||||||
|
in a pop up window.
|
||||||
|
|
||||||
|
** Module Flags
|
||||||
|
This module provides no flags.
|
||||||
|
|
||||||
|
** Plugins
|
||||||
|
+ [[https://github.com/akermu/emacs-libvterm][vterm]]
|
||||||
|
|
||||||
|
* 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 as =gcc= so that vterm can
|
||||||
|
build =vterm-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 [[https://emacsformacosx.com/][Emacs For Mac OS X]], this option is enabled.
|
||||||
|
- If you use [[https://github.com/d12frosted/homebrew-emacs-plus][emacs-plus]], this option is enabled by default.
|
||||||
|
- If you use [[https://github.com/railwaycat/homebrew-emacsmacport][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:
|
||||||
|
|
||||||
|
1. 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.
|
||||||
|
|
||||||
|
2. 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:
|
||||||
|
|
||||||
|
#+BEGIN_SRC sh
|
||||||
|
mkdir -p build
|
||||||
|
cd build
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
|
||||||
|
make
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
3. 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.
|
|
@ -1,94 +0,0 @@
|
||||||
#+TITLE: tools/vterm
|
|
||||||
#+DATE: January 16, 2019
|
|
||||||
#+SINCE: {replace with next tagged release version}
|
|
||||||
#+STARTUP: inlineimages
|
|
||||||
|
|
||||||
* Table of Contents :TOC_3:noexport:
|
|
||||||
- [[Description][Description]]
|
|
||||||
- [[Prerequisites][Prerequisites]]
|
|
||||||
- [[Emacs requirement][Emacs requirement]]
|
|
||||||
- [[System requirement][System requirement]]
|
|
||||||
- [[Module requirement][Module requirement]]
|
|
||||||
|
|
||||||
* Description
|
|
||||||
An [[https://github.com/akermu/emacs-libvterm][emacs-libvterm]] module.
|
|
||||||
|
|
||||||
* Prerequisites
|
|
||||||
|
|
||||||
** Emacs requirement
|
|
||||||
|
|
||||||
You have to compile emacs with =--with-modules= option.
|
|
||||||
|
|
||||||
Check the =system-configuration-options= variable to see if your emacs has this
|
|
||||||
option.
|
|
||||||
|
|
||||||
- On Archlinux or Manjaro, if you install emacs with pacman, this option is
|
|
||||||
enabled.
|
|
||||||
- On macOS:
|
|
||||||
- If you use [[https://emacsformacosx.com/][Emacs For Mac OS X]], this option is enabled.
|
|
||||||
- If you use [[https://github.com/d12frosted/homebrew-emacs-plus][emacs-plus]], this option is enabled by default.
|
|
||||||
- If you use [[https://github.com/railwaycat/homebrew-emacsmacport][emacs-mac]], this options is *not* enabled by default. You may have
|
|
||||||
to reinstall emacs with the option:
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
brew install emacs-mac --with-modules
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** System requirement
|
|
||||||
|
|
||||||
You need to have =libvterm= installed in your system.
|
|
||||||
|
|
||||||
On Ubuntu or Debian:
|
|
||||||
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
sudo apt install libvterm-dev
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
On ArchLinux or Manjaro:
|
|
||||||
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
sudo pacman -S libvterm
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
On macOS:
|
|
||||||
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
brew install libvterm
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
|
|
||||||
** Module requirement
|
|
||||||
|
|
||||||
You have to compile and install the requied module =vterm-module.so=.
|
|
||||||
|
|
||||||
In order to compile it you need to have:
|
|
||||||
|
|
||||||
- Compilation tools. This include =make=, =cmake= and a c compiler such as
|
|
||||||
=gcc=.
|
|
||||||
- Internet connection, because =cmake= will automatically download some requied
|
|
||||||
libraries from the internet.
|
|
||||||
|
|
||||||
There are several ways to install the module:
|
|
||||||
|
|
||||||
1. 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.
|
|
||||||
|
|
||||||
2. A fully byte-compile will cause emacs to automatically compile and install
|
|
||||||
the module if it cannot find an executable =vterm-module.so= file.
|
|
||||||
|
|
||||||
3. You can compile and install the module yourself. Go to the vterm installation
|
|
||||||
directory, which is usually
|
|
||||||
=~/.emacs.d/.local/packages/elpa/vterm-<version>=, and run the following:
|
|
||||||
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
mkdir -p build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
|
|
||||||
make
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
4. You can also compile the module at other place, and install the compiled
|
|
||||||
=vterm-module.so= file to your vterm installation folder, which is usually
|
|
||||||
=~/.emacs.d/.local/packages/elpa/vterm-<version>/=. Also make sure the module
|
|
||||||
file is executable.
|
|
Loading…
Add table
Add a link
Reference in a new issue