I just installed Visual Studio Code 1.28.1, but I'm unable to associate it with the .txt
extension on Windows 10.
I'm well aware how to associate an extension with an application on Windows. I can right-click in Explorer, select, "Open As...", select the application, and make sure "Always open with this app" is checked. Or I can go in to the properties of a file in Explorer, look at "Opens with", and click on "Change". Or I can go to "Choose default apps by file type …", etc. The problem is that none of this is working with VS Code.
Currently my .txt
files are associated with EmEditor. I change the association to Notepad. No problem. I change the association back to EmEditor. That works.
But if I select the blue "Visual Studio Code" option that appears in the list of applications, nothing changes. The old association remains.
I even tried ignoring the blue icon in the selection list, and manually browsed and selected %LocalAppData%\Programs\Microsoft VS Code\Code.exe
as the default editor. That doesn't work, either. Nor did manually selecting %LocalAppData%\Programs\Microsoft VS Code\bin\code.cmd
.
In case you think this might be related to EmEditor, I tried to associate .tidyconfig
files (which on my system are currently not associated with any editor at all) with VS Code. It did nothing.
What's going on? Associating VS Code with my text files should be the most basic of basic Windows integration. Why won't it work?
(I filed this as VSCode Issue #61084, but I had no responses. I'm filing it here in case the "bug" is some sort of user error.)
"%LocalAppData%\Programs\Microsoft VS Code\Code.exe" "sometxt.txt"
?.txt
extension in Windows 10? What was the result for you? Did you succeed?