Skip to content

Commands

jbyuki edited this page Mar 6, 2021 · 7 revisions

This is a list of commands defined by the instant.nvim plugin.

InstantStartSingle [host] [port (default: 80)]

This command will initiate a buffer share. Only the current buffer is shared.

Parameters:

  • Host: direct IP address or URL
  • Port: server port

Possible errors:

  • Server is already busy: Try InstantJoinSingle
  • ERRCONNREFUSED: The connection could not be established, verify host and port

InstantJoinSingle [host] [port (default: 80)]

Join a server where one client has already issued a InstantStartSingle. The current buffer will be overwritten with the shared content.

Parameters:

  • Host: direct IP address or URL
  • Port: server port

Possible errors:

  • Tried to join an empty server: Try InstantStartSingle.
  • ERRCONNREFUSED: The connection could not be established, verify host and port
  • Share mode client server mismatch: A session share was initiated, try InstantJoinSession.

InstantStop

This command stops the client communication with the server.

Note: It can be used to stop a single buffer share (InstantStartSingle) or session share (InstantStartSession).

InstantStartSession [host] [port (default: 80)]

The command initiates a session share. All opened buffers will be shared with other clients.

Parameters:

  • Host: direct IP address or URL
  • Port: server port

Possible errors:

  • Server is already busy: Try InstantJoinSession
  • ERRCONNREFUSED: The connection could not be established, verify host and port

Note: Special buffers (for ex. terminal) are not shared.

Note: When a file is opened, or a new buffer is created, it will automatically send the content to other clients and will be synced.

InstantJoinSession [host] [port (default: 80)]

This command will join a session share. New buffers are created for the shared content.

Parameters:

  • Host: direct IP address or URL
  • Port: server port

Possible errors:

  • Tried to join an empty server: Try InstantStartSession.
  • ERRCONNREFUSED: The connection could not be established, verify host and port
  • Share mode client server mismatch: A single buffer share was initiated, try InstantJoinSingle.

InstantStatus

This command shows the current connection status.

InstantFollow [username]

This command will enable follow on a user.

Parameters:

  • username

InstantStopFollow

This command will disable any follow.

InstantOpenAll

This command will open all the files located in the current directory. It is useful for sharing the whole directory in session share.

InstantSaveAll

This command will save all opened buffers. Use InstantSaveAll! to overwrite existing files.

InstantStartServer [host (default: 127.0.0.1)] [port (default: 8080)]

Start a server in the Neovim client. The server can be joined from the same client.

Parameters:

  • Host: direct IP address or URL
  • Port: server port

Possible errors:

  • ERRADDRINUSE: The port is already used by a different process. Make sure the port is free and restart.

InstantStopServer

The command kills the server as well as any connections still active.

InstantMark

The command visually mark the region selected in visual mode. It sends the marked region to other connected clients. In follow mode, this will bring any following users to the marked region. InstantMark should be invoked in visual mode, but should not pass the range.

InstantMarkClear

The command clears any marked region. It does not affect the marked regions in other clients.