separate Vim and Emacs sections

[Imported from Trac: page SftpFrontend, version 80]
davidsarah 2012-03-12 00:50:06 +00:00
parent 9799e5c6e3
commit a90aaa5bee

@ -119,11 +119,9 @@ The following options are in the Settings dialog accessed from the Edit menu:
* In the Transfers section, you may want to increase the maximum number of simultaneous transfers. * In the Transfers section, you may want to increase the maximum number of simultaneous transfers.
* In the File Types subsection, you may want to set the Default transfer type to Binary, delete all of the filetypes in the list, and uncheck 'Treat files without extension as ASCII file' and 'Treat dotfiles as ASCII files'. (This isn't Tahoe-specific, but attempting to automatically detect and convert line endings of text files is usually the wrong thing.) * In the File Types subsection, you may want to set the Default transfer type to Binary, delete all of the filetypes in the list, and uncheck 'Treat files without extension as ASCII file' and 'Treat dotfiles as ASCII files'. (This isn't Tahoe-specific, but attempting to automatically detect and convert line endings of text files is usually the wrong thing.)
## !Emacs/Vim ## Vim
Emacs can edit remote files using [TRAMP](http://www.gnu.org/software/tramp/), and likewise Vim using [netrw.vim](http://www.vim.org/scripts/script.php?script_id=1075). Emacs 23.4.1 was tested and does not work since TRAMP expects a "shell" rather than the "subsystem" (see [RFC 4254 section 6.5](http://tools.ietf.org/html/rfc4254#section-6.5)) interface Tahoe-LAFS supports. Vim can edit remote files over SFTP using [netrw.vim](http://www.vim.org/scripts/script.php?script_id=1075). Vim 7.3 with netrw.vim 142 was tested and works. I couldn't find out how to specify a port when opening a remote file (perhaps it's not possible), but you can setup a host with the correct port in your ssh config (`~/.ssh/config` for me):
Vim 7.3 with netrw.vim 142 was tested and works. I couldn't find out how to specify a port when opening a remote file (perhaps it's not possible), but you can setup a host with the correct port in your ssh config (`~/.ssh/config` for me):
``` ```
Host tahoe Host tahoe
@ -133,3 +131,7 @@ Port 8022
``` ```
Now to open a file: `vim sftp://peter@tahoe/secrets.txt`, where `secrets.txt` is a file at the root of the dircap associated with the SFTP user `peter` in `accounts.file`. You'll get a password prompt whenever you open or save. Warning: netrw.vim stores the remote file in a temporary file on local non-volatile memory, so this technique does not prevent the plaintext contents of your file from being stored on your disk. Now to open a file: `vim sftp://peter@tahoe/secrets.txt`, where `secrets.txt` is a file at the root of the dircap associated with the SFTP user `peter` in `accounts.file`. You'll get a password prompt whenever you open or save. Warning: netrw.vim stores the remote file in a temporary file on local non-volatile memory, so this technique does not prevent the plaintext contents of your file from being stored on your disk.
## Emacs
Emacs can in theory edit remote files using [TRAMP](http://www.gnu.org/software/tramp/). Emacs 23.4.1 was tested and does not work since TRAMP expects a "shell" rather than the "subsystem" (see [RFC 4254 section 6.5](http://tools.ietf.org/html/rfc4254#section-6.5)) interface Tahoe-LAFS supports. It's very unlikely that Tahoe will be changed to support a shell interface over SFTP, since the set of commands that should be implemented is not standardized.