VSCode how to connect to WinSCP
Asked Answered
Z

5

17

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 !.!".

Zymosis answered 2/5, 2015 at 8:30 Comment(0)
S
-7

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

Synchro answered 2/5, 2015 at 18:25 Comment(4)
You can suggest & vote for features at visualstudio.uservoice.com/forums/293070-visual-studio-code . This helps with the backlog prioritizationSynchro
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.Octagon
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.Elmoelmore
@Elmoelmore you can open the whole folder and navigate - it's not the same as the native experience but it is possibleFougere
H
32

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" !.!

Haywire answered 20/6, 2016 at 6:13 Comment(6)
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.Yourself
For 64-bit versions of VS Code, the path will be "C:\Program Files\Microsoft VS Code\Code.exe" !.!.Shirty
@BenjaminRay why !.! I added just the path to code.exe and stuff works. Am I missing something with that parameter?Jacquenette
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.Haywire
Thanks so much! I had to remove the other editors, so it will open VSC per defaultFougere
Does not work, it only open a blank file.Our
P
11

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

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

Podophyllin answered 22/7, 2020 at 13:24 Comment(2)
Thanks so much! I had to remove the other editors, so it will open VSC per defaultFougere
@ChagaiFriedlander I don't think removal is necessary if you have it in the top positionPodophyllin
H
5

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

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

Hydrargyrum answered 12/10, 2019 at 17:36 Comment(1)
Thanks but this should be "C:\Users\HP\AppData\Local\Programs\Microsoft VS Code\Code.exe" VS Code\Code.exe !.!Siple
P
3

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.

Polyadelphous answered 1/10, 2017 at 10:36 Comment(1)
I saw this extension before but it doesn't let you use ftps (explicit) only ftp. Not secure.Broglie
S
-7

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

Synchro answered 2/5, 2015 at 18:25 Comment(4)
You can suggest & vote for features at visualstudio.uservoice.com/forums/293070-visual-studio-code . This helps with the backlog prioritizationSynchro
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.Octagon
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.Elmoelmore
@Elmoelmore you can open the whole folder and navigate - it's not the same as the native experience but it is possibleFougere

© 2022 - 2024 — McMap. All rights reserved.