1

I'm using Sublime Text 3 for editing my code on a remote server. I use sshfs to mount a directory from the server on my computer and make my changes using my local Sublime Text. Then I usually build my project in a separate terminal window ssh-d to the remote server (basically just sending a make command).

Is there a way to achieve the same functionality from inside Sublime Text? What I am looking for is a terminal extension capable of ssh-ing , sending a make command and capturing the compiler messages.

2
1

You can use Glue for this.

Goto your sublime text editor, clear it out and close all documents.

Ctrl+Shift+P

A list of things will appear, if you have never installed the package manager it will appear here too. If thats so, install it now. Then repeat Ctrl+Shift+P again and look for:

Package control: install package

select this, a box with package options will appear type:

glue

the glue console-subl merger package will appear, select it.

It will install the package for you and present you with post install instructions, but if you have not changed much of your OS in terms of path, it will probably already work.

To open the terminal interface, open a new file and then press:

Ctrl+Alt+G

you will see a console box open at the bottom of subl. You may now type your commands and it should link with an available empty file, or create one for itself renaming that file to "terminal.glue" and it should look as follows:

enter image description here

EDIT:

Further documentation can be found here:

1
  • I remember trying it out, but it was not capable of logging in to a remote via ssh. Jun 8 '17 at 6:50
0

As of now, it is not possible to use Glue to interactively SSH. As the developers state:

"Glue is limited in its capabilities in that it provides a non-interactive connection to your shell. When the local process returns, the data stream is disconnected and can no longer be used to provide data to the standard in stream for your ssh executable. My guess is that it hangs because the remote server is requesting authentication that you can't provide and the ssh client hangs." - https://github.com/chrissimpkins/glue/issues/23

Also right in the Glue docs it says:

Glue is a non-interactive interface to your system shell. This means that Glue communicates with your shell and the data stream is disconnected when the standard output or standard error data are returned to Glue.

This application structure leads to some limitations that differ from your traditional terminal emulator. In the following cases, you will need to return to your system terminal:

Use commands that require you to submit a superuser password Respond to standard input prompts from command line applications" -https://gluedocs.readthedocs.io/en/latest/limitations.html#glue-and-your-shell

Since that was 4 years ago, it seems they will never support this.

You might want to try the RemoteCpp package: https://packagecontrol.io/packages/RemoteCpp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.