Skip to content

collaborative editing in Neovim using built-in capabilities

License

Notifications You must be signed in to change notification settings

yutkat/instant.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

instant.nvim

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!

showcase.gif

Features

  • Live editing with multiple users

  • Share a buffer

  • Share a whole directory

  • See who is editing

Requirements

  • Neovim 0.5 (but might work on previous versions)

Install

Install using a plugin manager such as vim-plug.

Plug 'jbuyki/instant.nvim'

Configurations

  • Set your username in your $MYVIMRC. This must be set to start or join a server.
lua vim.g.instant_username = "YOUR USERNAME"

Usage

Buffer sharing

  1. Fire up ws_server.js using node.js.
  2. Open an instance and connect to the server.
:InstantStartSingle 127.0.0.1 8080
  1. Open another instance and join.
:InstantJoinSingle 127.0.0.1 8080
  1. Now the two buffers are synced

Directory sharing

  1. Fire up ws_server.js using node.js.
  2. Create a sharing folder and name it client1.
mkdir client1
  1. Start neovim into this folder.
cd client1/
neovim
  1. 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.

  2. Connect the first client with InstantStart.

:InstantStart 127.0.0.1 8080
  1. Create another folder and name it client2. Start the second instance of neovim.
mkdir client2
cd client2/
neovim
  1. Join the connection with InstantJoin.
:InstantJoin 127.0.0.1 8080
  1. Now all files should be sync up!

About

collaborative editing in Neovim using built-in capabilities

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages

  • Lua 86.8%
  • JavaScript 8.1%
  • Vim Script 5.1%