Tip #480: editing files on an ftp server listening on a non-standard port
tip karma |
Rating 19/12, Viewed by 1178
|
created: |
|
May 29, 2003 8:18 |
|
complexity: |
|
basic |
author: |
|
George Harrison |
|
as of Vim: |
|
6.0 |
Vim will edit files on an FTP server with the command:
e ftp://ftp.server/path/to/file/filename
But if you are using a virtual FTP server as in Bricolage to edit templates, the FTP server is listening on a non-standard port (typically 2121, but it can be something different).
In that case, the command would be
e ftp://ftp.server\#2121/path/to/file/filename.
Note the "\#". The standard syntax for specifying a port number is to append #2121 to the server name, where "2121" is the port to connect to. But Vim treats an unescaped "#2121" as an alternate file reference and fails with the message "No alternate file name to substitue for '#'". Escaping the "#" causes Vim to treat is an another character in the string, and the connection works.
help edit and then search for "count" to find the syntax for editing alternate files
This works on Red Hat and on WindowsNT.
<<Replace with NO Typing |
abbreviations only on shortcut >>
Additional Notes
|