Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send a command to all nvim istances #188

Open
Spo0on opened this issue Apr 8, 2023 · 0 comments
Open

Send a command to all nvim istances #188

Spo0on opened this issue Apr 8, 2023 · 0 comments

Comments

@Spo0on
Copy link

Spo0on commented Apr 8, 2023

I would like to be able to simultaneously send a command to each open nvim instance under a same dir.
E.g. when i open nvim it spawns an instance within a folder under /var/folders/8d/l1qvyhds0c57j9shgl2412_00000gn/T/nvim.(my username)/. So what i want to do is to send the command nvr --nostart --remote-send ':set background=light<CR>' (or :set background dark) to all nvim istances under these dirs to change nvim appearance in all windows simultaneously.
I managed to solve by using a small script:

for file in /var/folders/8d/l1qvyhds0c57j9shgl2412_00000gn/T/nvim.giuliocorona/*/*
do
    /Library/Frameworks/Python.framework/Versions/3.11/bin/nvr --nostart --remote-send ':set background=dark<CR>' --servername "$file"
done

but would be easier having a dedicated option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant