Send commands to neovim from :terminal
.
This project is a way for me to learn rust and experiment with the neovim API. It is in early development stage and not ready for production.
It is heavily inspired by neovim-remote which has more features, and probably less bugs.
USAGE:
neovim-cmd [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
cd
edit
help Prints this message or the help of the given subcommand(s)
rename
-
Use it as your commit message editor:
git config core.editor '~/bin/neovim-cmd edit --wait'
-
Use it to synchronize
$PWD
with:tchdir
:function cd() { builtin cd "$@"; # do a vim :tcd if we managed to cd and we are withing neovim if [[ -n ${NVIM_LISTEN_ADDRESS} ]]; then ~/bin/neovim-cmd cd "$@" fi } export cd
Inspired from Yazgoo's blog post
-
Install neovim 0.3.x. This is not compatible with neovim 0.3.x. See neovim instructions for details.
-
Install the rust toolchain with
rustup.rs
curl https://sh.rustup.rs -sSf | sh
-
Clone the source code:
git clone https://github.com/Makohoek/neovim-cmd neovim-cmd cd neovim-cd
-
Make sure you have the latest stable version of
cargo
and friends:rustup override set stable rustup update stable
-
Build for release:
cargo build --release
-
Copy the binary to a folder in your
$PATH
:cp target/release/neovim-cmd ~/bin