Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d-e-s-o/neovim-ctrl
A program for controlling a Neovim instance, typically from a tmux environment.
https://github.com/d-e-s-o/neovim-ctrl
linux neovim rust tmux
Last synced: 11 days ago
JSON representation
A program for controlling a Neovim instance, typically from a tmux environment.
- Host: GitHub
- URL: https://github.com/d-e-s-o/neovim-ctrl
- Owner: d-e-s-o
- License: gpl-3.0
- Created: 2019-02-05T06:53:00.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-06T15:34:28.000Z (about 1 month ago)
- Last Synced: 2024-10-07T15:36:42.764Z (about 1 month ago)
- Topics: linux, neovim, rust, tmux
- Language: Rust
- Homepage:
- Size: 96.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![pipeline](https://github.com/d-e-s-o/neovim-ctrl/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/d-e-s-o/neovim-ctrl/actions/workflows/test.yml)
[![crates.io](https://img.shields.io/crates/v/neovim-ctrl.svg)](https://crates.io/crates/neovim-ctrl)
[![rustc](https://img.shields.io/badge/rustc-1.57+-blue.svg)](https://blog.rust-lang.org/2021/12/02/Rust-1.57.0.html)neovim-ctrl
===========- [Changelog](CHANGELOG.md)
**neovim-ctrl** is a program to find and interact with a Neovim instance
running in a particular terminal. It works with Neovim 0.9.0 and higher.The program supports two commands:
- `find-socket` to discover the Unix domain socket of a running Neovim
- `change-window` to change the currently selected window/split based on
a key sequenceUsage
-----The program requires the TTY for which to find the (first) running
Neovim process the first argument.```bash
# Find the path to the Unix domain socket for a nvim process on TTY
# /dev/pts/3:
$ nvim-ctrl find-socket /dev/pts/3
> /tmp/nvimfMfu99/0
``````bash
# Send Ctrl-w-h to the Neovim on /dev/pts/7:
$ ctrlw=$(echo -n -e "\\x17")
$ nvim-ctrl change-window /dev/pts/7 "${ctrlw}h"
# Exit code 0 indicates that the window was actually changed.
$ echo $?
> 0$ nvim-ctrl change-window /dev/pts/7 "${ctrlw}h"
> Error: nothing changed
# Exit code 1 means that no change happened.
$ echo $?
> 1
```