Sublime Forum

SSH Workflow Question

#1

Hi,

I’m very new to Sublime, these forums and build systems in general, so apologies if this seems trivial and/or has already been covered already.

Our workflow is as follows:

  • C/C++ project exists on a linux derivative.
  • project is compiled using make, leveraging a GCC derivative
  • windows machine has access to linux machine via windows file sharing
  • we separately putty into linux machine using SSH to make, run and debug from windows machine
  • sublime text 3 is installed on windows machine
  • sublime project refers to mapped network address ( not SSH ); we modify code through sublime, but compile / debug separately through the putty terminal

There is a couple of things I’d like to do:

  1. Implement a new sublime build system that executes the linux make rather than the local cygwin make.
  2. When building, I’d like to see the SSH terminal output in sublime.
  3. Eventually I’d like to get clang auto complete working in this environment, to allow for better auto-completion and syntax highlighting.

Can anyone point me in the right direction?

0 Likes

#2

It’s been ages since I’ve done much with SSH on Windows, but since no one else has responded so far what I’d suggest is looking at running the build commands via ssh by passing the commands on an ssh command line, rather than interactively via PuTTY. I’ve briefly glanced at the PuTTY docs and I think using plink.exe is what you need.

0 Likes

#3

Awesome! That seems an effective solution to points 1 & 2. TY very much.

In regards to point 3, my understanding of clang/llvm is that it executes partial compiles to highlight syntax errors and provide proper auto-completion. Is this the intent of the ClangAutoComplete sublime package? Do we need to modify our build script to work in conjunction with this?

0 Likes

#4

I’m glad that helped.

I haven’t used the ClangAutoComplete sublime package but it looks like it is aimed at the auto-completion aspect only, not live syntax error highlighting (which I guess would kind of interfere with ST’s own syntax highlighting). But ClangAutoComplete needs to run clang directly and locally. It doesn’t interact with the Sublime Text build system at all, so I don’t think anything you modify in your build script would help with this. Of course, it’s all “just code” so I’d imagine with some effort you could fork ClangAutoComplete and get it to run remotely via SSH, but I’d also imagine the turnaround time could get a bit slow for live editing. On the other hand maybe running clang locally is OK for auto-completion, in which case no change to your build scripts are needed.

0 Likes