instant.nvim is a collaborative editing plugin for Neovim written in Lua with no dependencies.
This is in prototype stage. It should work but some important features are still missing! The transfer protocol is not optimized for large files transfer!
-
Live editing with multiple users
-
Share a buffer
-
Share a whole directory
-
See who is editing
- Neovim 0.5 (but might work on previous versions)
Install using a plugin manager such as vim-plug.
Plug 'jbuyki/instant.nvim'
- Set your username in your $MYVIMRC. This must be set to start or join a server.
lua vim.g.instant_username = "YOUR USERNAME"
- Fire up ws_server.js using node.js.
- Open an instance and connect to the server.
:InstantStartSingle 127.0.0.1 8080
- Open another instance and join.
:InstantJoinSingle 127.0.0.1 8080
- Now the two buffers are synced
- Fire up ws_server.js using node.js.
- Create a sharing folder and name it client1.
mkdir client1
- Start neovim into this folder.
cd client1/
neovim
-
Make sure the current folder is correct with
:pwd
. It will put all the files on the server! But don't worry if the folder is not empty, it will display an error. -
Connect the first client with
InstantStart
.
:InstantStart 127.0.0.1 8080
- Create another folder and name it client2. Start the second instance of neovim.
mkdir client2
cd client2/
neovim
- Join the connection with
InstantJoin
.
:InstantJoin 127.0.0.1 8080
- Now all files should be sync up!