Skip to content

A server that implements the Textmate's 'rmate' feature for any editors

License

Notifications You must be signed in to change notification settings

xiaozhuai/rmate-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rmate-server

中文说明

A server that implements the Textmate's 'rmate' feature for any editors.

Installation

  1. Download the rmate-server from releases page to local machine
  2. Choose a rmate version and download to remote server

Usage

  1. Write a config file named config.json
  2. Start with command line rmate-server -c config
  3. Create an ssh tunnel ssh -R 52698:127.0.0.1:52698 user@example.org
  4. On your remote system run rmate -w file

Tips

  1. If you want auto create a tunnel whenever you connect to a ssh server, put this into ~/.ssh/config

    Host *
    RemoteForward 52698 localhost:52698
    
  2. For secure reason, rmate-server listen loopback interface '127.0.0.1' as default rather than '0.0.0.0'.

  3. In WSL(Windows Subsystem Linux) environment, you need run rmate-server on windows, and there is no need to create a tunnel.

  4. For docker, I'am pretty sure there is a way, I didn't try it yet, if somebody has an experience, please make a pr.

  5. Never run rmate-server as root user unless you know what you are doing.

Config Examples

rmate-server can spawn many editor(almost any) your like, here is some examples, choose one as you favorite.

Visual Studio Code

{
    "host": "127.0.0.1",
    "port": 52698,
    "editor": {
        "command": "code",
        "args": [
            "-w",
            "{{file}}"
        ]
    }
}

Atom

{
    "host": "127.0.0.1",
    "port": 52698,
    "editor": {
        "command": "atom",
        "args": [
            "-w",
            "{{file}}"
        ]
    }
}

TextMat

{
    "host": "127.0.0.1",
    "port": 52698,
    "editor": {
        "command": "mate",
        "args": [
            "-w",
            "{{file}}"
        ]
    }
}

About

A server that implements the Textmate's 'rmate' feature for any editors

Resources

License

Stars

Watchers

Forks

Packages

No packages published