Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open remote files in sublime text 3

I am connecting to remote server using "mRemoteNG" and want to open remote server files in my local sublime text editor. During my research, I found this relevant blog https://wrgms.com/editing-files-remotely-via-ssh-on-sublimetext-3/ and followed the instructions but it is not working for me. Does, anybody know how can I open remote files in my Sublime?

like image 558
Raman Balyan Avatar asked May 26 '16 10:05

Raman Balyan


People also ask

How do I open a remote file?

Opening remote files with fopen( ) is implemented via a PHP feature called the URL fopen wrapper. It's enabled by default but is disabled by setting allow_url_fopen to off in your php. ini or web server configuration file. If you can't open remote files with fopen( ), check your server configuration.

Can you ssh in sublime?

Start working with your local Sublime From now on you can simply connect to your servers via SSH and open files by executing the command subl file. txt . After that, your local sublime will open and you will feel at home. Of course, you can also save your files.

How do I use Sublime Text on a server?

Editing files on the server with SublimeOn the File menu, click SFTP/FTP, and then click Setup Server. Sublime Text opens the configuration file for the connection. Confirm that the “type” value is “sftp”. For the “host” value, replace example.com with your own domain name.


1 Answers

On server

Install rsub:

wget -O /usr/local/bin/rsub \https://raw.github.com/aurora/rmate/master/rmate chmod a+x /usr/local/bin/rsub 

On local

  1. Install rsub Sublime3 package:

On Sublime Text 3, open Package Manager (Ctrl-Shift-P on Linux/Win, Cmd-Shift-P on Mac, Install Package), and search for rsub and install it

  1. Open command line and connect to remote server:

ssh -R 52698:localhost:52698 server_user@server_address

  1. after connect to server run this command on server:

rsub path_to_file/file.txt

  1. File opening auto in Sublime 3

As of today (2018/09/05) you should use : https://github.com/randy3k/RemoteSubl because you can find it in packagecontrol.io while "rsub" is not present.

like image 170
emamie Avatar answered Oct 06 '22 11:10

emamie