This release is a pre-release and may not be stable for production use.
vmux
vim/neovim/kakoune session handler within tmux
Demo
Features
- Each
tmuxsession has its own editor session - One global editor session can be started
- Suports gvim, vim, neovim and kakoune
- Seamless integration with
gvim,vim,nvim,kakthrough wrapper scripts that directly callvmux- keep your muscle's memory :-) - Once a session has been started in one editor, e.g.
nvim, the session will be reused even if another editor is called, e.g.vimorkak - A new session is started if the old session doesn't exist anymore
- Automatically select tmux pane running the local or global vim session
Installation
Python3 is required as well as tmux and vim, gvim or nvim.
Via PyPI
Install vmux using pip:
$ pip install vmux
From Source
Clone the repository and install vmux:
git clone https://github.com/jceb/vmux.git
cd vmux
make DESTDIR=~/.local install
# if wrapper scripts are desired, install them as well
make DESTDIR=~/.local all
# add ~/.local/bin to PATH variable
export PATH="${HOME}/.local/bin:${PATH}"
Usage
Start editor session through vmux or vim.vmux, nvim.vmux and gvim.vmux
wrapper scripts:
tmux
vmux MYFILE
# split tmux window
vmux MY_OTHERFILE
Once a session has been started, it doesn't matter anymore which editor has been
used. vmux will open every file in the existing session even if a wrapper
script of a different editor is used.
Customization
Define default editor:
# export environment variable VMUX_EDITOR, either vim or nvim
export VMUX_EDITOR=nvim
Define path to the real editor executables. This is required if the wrapper
scripts are used that will hide the real editors in $PATH.
export VMUX_REALEDITOR_VIM=/usr/bin/vim
export VMUX_REALEDITOR_NVIM=/usr/bin/nvim
export VMUX_REALEDITOR_GVIM=/usr/bin/gvim
export VMUX_REALEDITOR_KAK=/usr/bin/kak
Define that a global session should be started. One global and multiple local sessions can exists next to one another:
export VMUX_GLOBAL=1
Define that the tmux pane shall not be selected automatically:
export VMUX_NOT_SELECT_PANE=1
Define socket path for nvim:
export VMUX_NVIM_SESSION_DIR=~/.cache/nvim_sessions
Turn on debugging:
export VMUX_DEBUG=1
How it works
When vmux is called, it defines a variable VMUX_SESSION_<ID> that is unique
to the current tmux session. The value of the variable is set to <ID> that
is used as session name for vim.vmux and nvim.vmux. Furthermore, the global
session that is started through gvim.vmux is stored in the environment
variables VMUX_SESSION and VMUX_GLOBAL_PANE. The session name is set to
global.
Known issues
I noticed with neovim that the session socket doesn't always get removed when it ends. This might causes vmux to permanently fail to start a new session. It can be manually resolved by deleting the stalled socket file in neovim's session folder.
Similar projects
- tmux-omnivim creates one global
session while
vmuxcreates one session pertmuxsession and it also supports one global session next to multiple local sessions.
Metadata
Release files for vmux 1.1.dev14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vmux-1.1.dev14.tar.gz | 23.7 kB | Without provenance | Details for vmux-1.1.dev14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vmux-1.1.dev14-py3-none-any.whl | Python 3 | none | any | Details for vmux-1.1.dev14-py3-none-any.whl |
Total release size: 43.2 kB
Release files / vmux-1.1.dev14.tar.gz
| Download URL | vmux-1.1.dev14.tar.gz |
|---|---|
| Size | 23.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee676c34d51c2b0fc78406932823c0f3aefc1744c54c95683ee3670df5848a90
|
|
BLAKE2b-256 checksum How to use checksums |
0975092ec6762a0d5448dd366939bb4e9a5b1c2cc44cf653ce2b6484beda99af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / vmux-1.1.dev14-py3-none-any.whl
| Download URL | vmux-1.1.dev14-py3-none-any.whl |
|---|---|
| Size | 19.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8aa74244462bf5593549f7add84929aedbc68266ee0a98bc40ef3b6d6181227c
|
|
BLAKE2b-256 checksum How to use checksums |
167a9c9d562ef60554f1eea7b83e22063447d986f63738cdfde9f74bcfb24c5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Security for vmux 1.1.dev14
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.