Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chmln/nvim-ctrl
Control neovim instances using the command line.
https://github.com/chmln/nvim-ctrl
Last synced: 14 days ago
JSON representation
Control neovim instances using the command line.
- Host: GitHub
- URL: https://github.com/chmln/nvim-ctrl
- Owner: chmln
- Created: 2020-04-08T23:05:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-06T23:53:23.000Z (9 months ago)
- Last Synced: 2024-10-14T13:50:43.201Z (28 days ago)
- Language: Rust
- Homepage:
- Size: 19.5 KB
- Stars: 52
- Watchers: 5
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nvim-ctrl
`nvim-ctrl` sends commands to all running neovim instances.
Examples:
```sh
# Turn on dark syntax
nvim-ctrl 'set background=dark'# Toggle night mode based on environment variable
nvim-ctrl 'let $NIGHT_MODE="true"'
nvim-ctrl 'source ~/.dotfiles/nvim/init.vim`
```## Install
1. Download a binary from [releases](https://github.com/chmln/nvim-ctrl/releases)
OR
`cargo install --git https://github.com/chmln/nvim-ctrl`
2. Open up neovim in a few places and run some commands with `nvim-ctrl`## How It Works
Neovim [automatically](https://github.com/neovim/neovim/blob/master/runtime/doc/api.txt) sets up RPC sockets in /tmp on unix systems, unless its overridden by `--listen`. `nvim-ctrl` finds these sockets and sends them the appropriate commands.