2

(vim --servername、または vim over ssh、または「ssh のみを使用する」、または nfs、sshfs などの代替提案はありません。また、ncat のようなより精巧な netcat の具体化を避けることを好みます)

ネットワーク経由で別のコンピューターにあるテキスト ファイルを編集したいのですが、netcat を使用するとそれほど簡単ではないことがわかっています。しかし、netcat をより深く理解していれば、それは可能だと確信しています。その理解を深めたいと思っています。

パイプと fifo を使用して netcat で独自の REST サービスを作成する方法を知っています。また、bash シェル全体を netcat 経由で公開できることも知っていますが (危険です)、プロンプトは表示されません。それでも、bash コマンドの出力はクライアントに表示されます。

テキスト エディタ (vim、pico、nano、emacs など) をネットワーク経由で読み取りと書き込みの両方で動作させるには、どうすればよいですか?

4

1 に答える 1

1

vim doc から:

Editing files over a network                *new-network-files*
----------------------------

Files starting with scp://, rcp://, ftp:// and http:// are recognized as
remote files.  An attempt is made to access these files with the indicated
method.  For http:// only reading is possible, for the others writing is also
supported.  Uses the netrw.vim script as a standard "plugin". |netrw|

別のチュートリアル: http://vim.wikia.com/wiki/Edit_remote_files_locally_via_SCP/RCP/FTP


# open a remote file
vim scp://remote-computer:22//tmp/file.txt

# ... EDIT ...

# write it back (run in vim)
:Nwrite
于 2014-08-16T00:50:00.933 に答える