13

Is there a way to connect Visual Studio Code to WinSCP program?

I tried that, but it doesn't work. I set this value to external editor "C:\Users\Omistaja\AppData\Local\Code\update.exe --processStart Code.exe !.!".

tvl
  • 3,466
  • 2
  • 14
  • 35
Fubz
  • 153
  • 1
  • 1
  • 4

5 Answers5

23

You can add VSCode as an external editor in WinSCP. Goto View/Preferences then select Editors in the box on the left, then click Add under Editor Preferences, then under Editor select External Editor and put in the path something like this: "C:\Program Files (x86)\Microsoft VS Code\Code.exe" !.!

user2069805
  • 330
  • 2
  • 5
  • 1
    This actually works very well! I just wired it up myself. Even updates the remote server on save. Pretty much feels like you are editing locally. – joshrathke Aug 17 '17 at 16:14
  • For 64-bit versions of VS Code, the path will be `"C:\Program Files\Microsoft VS Code\Code.exe" !.!`. – Benjamin Ray Jul 13 '19 at 12:59
  • 1
    @BenjaminRay why `!.!` I added just the path to `code.exe` and stuff works. Am I missing something with that parameter? – Slav Aug 29 '19 at 18:55
  • I'm guessing it will replace that with the filename, but I don't know for sure. I found this somewhere else. If someone knows the answer to this, please share. – user2069805 Aug 29 '19 at 23:30
5

Under Options/Preferences, it is in the Editors settings panel. Add a external editor on the editors page

IMPORTANT -- When VSCode is installed, it asks if it is for you or for all users on your machine. That makes a difference where the Code.exe is located

Win 10 x64 for ALL Users - "C:\Program Files\Microsoft VS Code\Code.exe" !.!
Win 10 x64 for just you - "C:\Users\<profile name>\AppData\Local\Programs\Microsoft VS Code\Code.exe" !.!

enter image description here

wruckie
  • 1,480
  • 1
  • 20
  • 27
3

Open winscp from navigation goto Files > Edit > Configure..

Add > External Editor Set path "%LOCALAPPDATA%\Programs\Microsoft VS Code\Code.exe"

2

There is a VScode extension that do the same thing as WinSCP synchronisation editing. One advantage with this extension : you can edit the entire folder, then not edit file per file.

-5

VSCode currently has no support for editing files/folders over remote protocols as FTP or SFTP

Alex Dima
  • 17,553
  • 1
  • 12
  • 13
  • You can suggest & vote for features at https://visualstudio.uservoice.com/forums/293070-visual-studio-code . This helps with the backlog prioritization – Alex Dima May 03 '15 at 20:00
  • 1
    This does not answer the question. He's referring to his WinSCP editor configuration. WinSCP has the ability to open files over sftp and stream them into an editor of choice. – Tillman32 Apr 19 '17 at 02:32
  • The real question is can you open the whole folder, and see the tree structure. It is not about opening an individual file. That can be done from every editor through WinSCP config. I think that the answer in - no. – vladatr May 14 '18 at 17:26