sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
814 stars 40 forks source link

Remote development mode #3414

Open greneholt opened 4 years ago

greneholt commented 4 years ago

Problem description

For non-portable development environments (i.e. cannot run locally on a laptop), there are only a couple options for using Sublime while working remotely:

  1. Use VNC or some type of remote desktop to access sublime running on the remote machine. This involves significant latency while typing that make it frustrating to use.
  2. Use SFTP/SSHFS/NFS to mount the project locally. This is very slow for large projects, especially with regards to searching and indexing.

Preferred solution

Add a remote-development mode to sublime text, similar to what is offered by VS Code.

In this mode, instances of Sublime Text would be running on both the remote and local machines. The local instance would maintain a persistent network connection to the remote instance.

Syntax highlighting, editing, and all of the UI would be handled by the local instance, while all indexing, searching, file IO, and shell operations would be performed by the remote instance.

For example, when the user presses ctrl+p to go a file, the local instance would request the list of available files from the remote (or maintain a cache of the list), and then perform the fuzzy search locally. When the user selects a file, the contents of that file would be read by the remote, transmitted to the local instance, and then displayed to the user.

TerminalFi commented 4 years ago

Just my 2 cents, sounds like it should live as a plugin.

greneholt commented 4 years ago

A plugin could probably implement most functionality. There are some missing API's however necessary to make it work, such as an API for getting a list of all files or all symbols in the project. I asked in Discord about the possibility of such API's being added, but some concern was expressed about the amount of data that would be returned by such an API.

TerminalFi commented 4 years ago

A plugin could probably implement most functionality. There are some missing API's however necessary to make it work, such as an API for getting a list of all files or all symbols in the project. I asked in Discord about the possibility of such API's being added, but some concern was expressed about the amount of data that would be returned by such an API.

Files wouldn’t necessarily be an issue but symbols for sure ! I do like the idea of it. And theoretically the amount of data could be a concern.

This would be a cool feature

lianghu commented 4 days ago

to have the local sublime instance act as GUI only and the remote instance accept operation input from ssh connection and send back the final operation result back. Any plan for this feature?