How to Open a File From FTP Directly In Text Editor / Visual Studio Code

It used to be that when I right-clicked on an .html file in FTP and selected view/edit:

it would automatically open the file in my text editor (Visual Studio Code).

Now it opens directly in the browser:

How can I make it so that when I right click on a file in FTP and select View / Edit, it will automatically open in VSCode?

Thank you!


Solution 1:

Right click on an .html file on your desktop and select Get Info. Then select your text editor or Visual Studio Code from the "opens with" drop-down menu. Then hit change all.

enter image description here

EDIT: Be sure to stop and restart your Browser, Filezilla / FTP program, and Visual Studio Code / text editor after doing this.

EDIT 2: Just doing the above sometimes isn't enough. You may also have to change your file settings in FileZilla. Go to FileZilla --> Settings --> Filetype Associations, and make sure all of the filetypes you want to open in VS Code are entered in the text-area:

enter image description here