Alec the Geek

Reflections on software and related things from an older geek

  • Twitter Ramplings

  • My Bookmarks

  • RSS Alec’s GitHub

    • An error has occurred; the feed is probably down. Try again later.

Handy Hack: How to use Vim netrw in ftp passive mode

Posted by Alec The Geek on 6 February 2007

The Vim editor can edit files on a remote machine using ftp to open and save the file (other protocols such as DAV and scp are also supported). The plugin is called netrw and comes standard with modern Vim.

When using ftp it is often the case that passive mode must be used across firewalls, which is not ftp’s default behaviour (at least not on my Linux system). However ftp often has a command line switch to force passive (e.g. -p). Just add let g:netrw_ftp_cmd="ftp -p" to your ~/.vimrc file. You will need to change this depending on the specific options and features of your ftp program.

About these ads

2 Responses to “Handy Hack: How to use Vim netrw in ftp passive mode”

  1. Celi said

    Thanks for the tip! Very handy.

  2. Thanks a lot — first result on a search for “vim pasv ftp” and did exactly what it said on the tin!

Sorry, the comment form is closed at this time.

 
Follow

Get every new post delivered to your Inbox.

Join 272 other followers

%d bloggers like this: