Always opening files in terminal in existing/running Neovide window/app #2978
-
Hi all, can someone point me in the right direction, to configure Neovide so i can:
So, always only have 1 Neovide window/app running. Is this currently possible? |
Beta Was this translation helpful? Give feedback.
Answered by
fredizzimo
Jan 22, 2025
Replies: 1 comment 8 replies
-
Note, I don't have a computer to test this on right now, but something like this should work. Create an executable shell script in accesible in your path, call it for example #!/usr/bin/env bash
# An existing instance is running
if [[ -e /tmp/neovide.sock ]]; then
absolute_paths=()
# Convert each argument to its absolute path
for arg in "$@"; do
absolute_paths+=$(realpath "$arg")
done
# Open the absolute paths in an existing instance
nvim --server /tmp/neovide.sock "${absolute_paths[@]}"
else
# Start neovide and a new rpc server
neovide -- "+serverstart('/tmp/neovide.sock')" "$@"
fi Now, you should be able to just |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry for the problems, it's hard to get right without being able to test it.
It looks like it needs
--remote
in addition to--server
.nvim --server /tmp/neovide.sock --remote "${absolute_paths[@]}"
https://neovim.io/doc/user/remote.html#--server