This is an old revision of the document!

Vim can be easily configured for use with WinSCP. To configure Vim as an external editor in WinSCP, do the following:

  1. From the menu of WinSCP, select Options > Preferences
  2. Select Editors from the left pane of the Preferences window.
  3. From Editor Preference, select Add …
  4. From the Add Editor window, click on the External editor radio button.
  5. Click the Browse button and navigate to the path where Vim is installed. For example, the default installation for a Windows installation of Vim is “C:\Program Files\Vim\vim72\ (Assuming Vim 7.2 is your version). You could also apply these steps to the portable version of Vim as well.
  6. Select gvim.exe as the editor. (Note: This selects the GUI version of Vim.)

You will notice the the box will return something that looks similar to the following: ”C:\Program Files\Vim\vim72\gvim.exe“ !.! Make sure to ,leave the !.! as it is at the end.

  1. For simple use of Vim, choosing the External editor options choices below are optional depending on your needs. However, as you see below, this is not the case for using tabs.
  2. Click OK to finish the setup.

Whenever you right-click on a file and select Edit, the file will be loaded into Vim for editing.

Configuring WinSCP for Vim Multi-Tab Use

Vim supports multiple tabs as of version 7. Invoking a multiple tab session requires an additional command line argument to be passed to Vim. In step 6 above, it documents what is returned when the Vim editor executable is selected. The string ”C:\Program Files\Vim\vim72\gvim.exe“ !.! is indicated in the box for External editor. In order to enable multiple tab support, you must pass the –remote-tab-silent argument to the command line just before !.!. So, the full command line string should look accordingly:
”C:\Program Files\Vim\vim72\gvim.exe" –remote-tab-silent !.!

File(s) > Edit