Skip to content

Commands

jbyuki edited this page Nov 23, 2020 · 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.

Clone this wiki locally