Tag Archives: gedit

How to Edit Remote Files on Local Computer


I will introduce the way to edit and save files at the remote server, on my local machine, and other alternative way.

Story

At the company, everyone develops the program on the remote server. Yes, it is Linux server with dark terminal, which provides only vim editor. The server can’t connect to public internet, so we need to upload tools with WinSCP from local machine if we want.

ローカルマシンで開発環境を構築するにも、いろんなチームが開発した多様なライブラリがないと動かないようになっていたため、ローカルマシンの環境を構築するのは困難な状況でした。 ファイアウォールの接続制限なんかもあって。

So I decided to edit remote files directly on the local machine, which can connect to the internet and install rich editors.

ここからは、リモートのファイルを(擬似的に)直接編集できるエディタを紹介していきます。

インストールすれば編集可能になるエディタ

まずは、インストールさえすれば編集可能になるエディタを紹介します。 プラグインなどの追加インストールは不要です。

NetBeans

IDE なら簡単にできるんじゃないかと思って トライしてみたのが NetBeans です。実際のところ、とても簡単に思い通りのことができました。

保存時に自動でリモートマシンに保存してくれます。シンタックスチェックもやってくれます。

既存のリモートマシンのファイルを元にプロジェクトを作成して進めていくこともできますし、新たにプロジェクトを作ってそこからリモートマシンにアップロードすることもできます。

やりかたは、 NetBeans のページで紹介されていますので、そちらをご覧ください。

参考: NetBeans IDEを使用するリモートWebサーバーへのPHPアプリケーションのデプロイ

Komodo Edit

Follow Edit, Preference, and you can configure remote server. After configuration, it can edit remote files.

reference: Basic settings to use Komodo Edit (removed: http://shimz.me/blog/editor/148)

gedit

After some configuration, it can edit remote files.

reference: Use Gedit as Remote File Editor via FTP and SSH (Ubuntu) (removed: http://thecodecentral.com/2010/04/02/use-gedit-as-remote-file-editor-via-ftp-and-ssh-ubuntu)

プラグインなどをインストールすることで編集可能になるエディタ

ここから下は 別途プラグインなどのインストールをすることで、リモートファイルが編集可能になるエディタです。

Eclipse

プラグインを使うと NetBeans と同じようなことができます。 プラグインは General Purpose Tool – Dynamic Languages Toolkit -Remote Development Support 。

参考: Eclipse Keplerで仮想環境上(リモート上)のファイルを編集する。

Sublime Text 2

It can edit remote files with SFTP plugin.

reference: Sublime text SFTPをつかってリモートファイルをローカルで快適に編集

It can edit remote files with rsub plugin, which requires the server to install something.

reference: リモートサーバー上のファイルをローカルのSublime Text 2で編集する (deleted)

Notepad++

It can edit remote file with NppFTP plugin.

reference: How to setup Notepad++ FTP plugin “NppFTP”

geany

geany はサポートしていません! ……が、 gnome だったら fuse を使えば ローカルマシンのようにリモートファイルを扱えるそうです。 これだと、 geany でなくても gnome なら どんな エディタ 使っても OK ですね。

reference: Does Geany support editing files remotely through FTP or SSH?

gVim

Windows マシン から、 PuTTY と連携して scp を使えるようにしようとしましたが、あえなく失敗。リモートマシンからファイルの一覧すら取得できませんでした。やり方を紹介しているサイトは多いのですが。

興味のある方は是非。

reference: vimからSSH/SCP接続してみる