Open sponge opened 3 years ago
Windows 11 is now officially released since 10 days...
Yeah it'd be nice to have this implemented.
Any progress in this regard? I'm eager to get this feature :) For me, it's very inconvenient that I changed to VS Code to edit single files...
Any updates on this issue? I really enjoyed bypassing the Windows "Open With" dialog when opening an unknown file. It's an annoyance that I now need to use VS Code because even that starts faster than navigating to the "Shift + F10" context menu...
I also want this. It is very annoying when opening unknown file extensions that are text files. Going through many unnecessary steps now. I would also like to see a "Open in Sublime Text" next to the "Open in Terminal", like the one that was in the root of the old context menu.
It's 2023 and Windows 11 is definitely a thing, can we have "Open in Sublime" on the context menu please 😢
FWIW, NPP does this right out of the box on install. might want to peep that source for getting this done. can't have NPP showing us up now, can we!? 😆
I was able to fix this with Start All Back and enable Windows 10 Context Menu. But surprised Sublime hasn't fixed this for Windows 11 yet without a workaround:
It isn't "fixed", because it's not a bug. ST just doesn't support the new style of context menu.
It isn't "fixed", because it's not a bug. ST just doesn't support the new style of context menu.
I guess I'm surprised Sublime text hasn't added support for the new style of Context Menu, it's kind of a deal breaker not to have it, was about to switch to VSCode since that has built in support for Windows 11 Context Menu
support for Windows 11 Context Menu
Well, if that' such an important productivity boosting feature you can't live without, than you probably should? I'd argue, ST is still faster up and running even with the extra context menu switch.
I prefer Sublime over VS Code but useful features like this are main decision points between the two, at least with the workaround of StartAllBack I can stick with Sublime for now.
I don't use Explorer for productivity reasons, thus I never see that menu. Hence it is of no priority for me - just to also state another point of user's view.
Any traction here? I'm suffering under Windows 11 now...
FWIW, this is an excerpt of the linked microsoft blog post:
“Universal openers,” like technical text editors, should register to handle
*
so they will always be offered as an “Open with” option. They should also explicitly register for any filetypes they are optimized to handle.
(Emphasis mine)
Still might require UWP, but it would serve as a sensible default if not, or at least it sounds quite reasonable to me.
So in this case SLT should register for *
and additionally for every file type that is directly supported, I'm assuming syntax highlighting support would qualify for that and that they have some kind of plan (probably sorting by specificity), though I'm unsure if that is possible with SLT plugins and should probably be a minor goal.
IIRC, registering as "Open With..." is the primary strategy of sublimehq. It is however unrelated with supporting IExplorerCommand.
To register ST for all file types, just add the following registry key:
; Register Sublime Text for "Open With..."
; https://docs.microsoft.com/en-us/windows/win32/shell/app-registration
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\OpenWithList\sublime_text.exe]
sublime_text.exe
should already have beeen registered by the installer, which adds the following registry keys:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\sublime_text.exe]
"FriendlyAppName"="Sublime Text"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\sublime_text.exe\DefaultIcon]
@="\"C:\\Program Files\\Sublime Text\\sublime_text.exe\",1"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\sublime_text.exe\shell\open\command]
@="\"C:\\Program Files\\Sublime Text\\sublime_text.exe\" \"%1\""
Just as a side note and in case you use a third-party software like https://github.com/ikas-mc/ContextMenuForWindows11 to add the context menu item manually; I recently created an icon that matches the style and colors of the built-in menu items. So I thought why not to share it:
Dark mode:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 448">
<rect stroke="#e0dfdf" stroke-width="28" fill="none" x="14" y="14" width="420" height="420" rx="84"/>
<path stroke="#4cc2ff" stroke-width="28" fill="none" d="m 344.92773,60.366821 c -0.41046,0.0377 -0.83661,0.121511 -1.27148,0.259767 L 104.31641,136.51916 c -2.35799,0.74812 -4.398149,2.82414 -5.482428,5.27736 C 98.315886,142.64006 98,143.68687 98,144.92737 v 77.57422 0.5332 c 0,1.2405 0.315886,2.28708 0.833982,3.13086 1.084279,2.4532 3.124438,4.52922 5.482428,5.27734 l 101.65038,32.23829 -101.65038,32.2246 C 100.83041,297.01188 98,301.03197 98,304.86096 v 77.56055 c 0,3.83599 2.83041,6.05522 6.31641,4.94922 l 239.33984,-75.87891 c 3.07325,-0.97701 5.63554,-4.22757 6.19336,-7.61523 C 349.94919,303.41886 350,302.93558 350,302.4137 v -77.57423 c 0,-3.82899 -2.83041,-7.84907 -6.31641,-8.95507 L 243.07227,183.98791 343.65625,152.09143 c 3.479,-1.106 6.30274,-5.12608 6.30274,-8.95507 V 65.575809 c 0,-3.356503 -2.15797,-5.472741 -5.03126,-5.208988 z"/>
</svg>
Light mode:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 448">
<rect stroke="#555" stroke-width="28" fill="#fafafa" x="14" y="14" width="420" height="420" rx="84"/>
<path stroke="#0078d4" stroke-width="28" fill="none" d="m 344.92773,60.366821 c -0.41046,0.0377 -0.83661,0.121511 -1.27148,0.259767 L 104.31641,136.51916 c -2.35799,0.74812 -4.398149,2.82414 -5.482428,5.27736 C 98.315886,142.64006 98,143.68687 98,144.92737 v 77.57422 0.5332 c 0,1.2405 0.315886,2.28708 0.833982,3.13086 1.084279,2.4532 3.124438,4.52922 5.482428,5.27734 l 101.65038,32.23829 -101.65038,32.2246 C 100.83041,297.01188 98,301.03197 98,304.86096 v 77.56055 c 0,3.83599 2.83041,6.05522 6.31641,4.94922 l 239.33984,-75.87891 c 3.07325,-0.97701 5.63554,-4.22757 6.19336,-7.61523 C 349.94919,303.41886 350,302.93558 350,302.4137 v -77.57423 c 0,-3.82899 -2.83041,-7.84907 -6.31641,-8.95507 L 243.07227,183.98791 343.65625,152.09143 c 3.479,-1.106 6.30274,-5.12608 6.30274,-8.95507 V 65.575809 c 0,-3.356503 -2.15797,-5.472741 -5.03126,-5.208988 z"/>
</svg>
The linked app currently doesn't support different icons for light and dark mode, so you'd need to decide for one of them.
I guess that if/when the ST devs eventually add support for the Windows 11 menu, they will probably use the "official" icon with the orange "S", but I kinda like how the icon looks with the standard Windows 11 style.
IIRC, registering as "Open With..." is the primary strategy of sublimehq. It is however unrelated with supporting IExplorerCommand.
To register ST for all file types, just add the following registry key:
; Register Sublime Text for "Open With..." ; https://docs.microsoft.com/en-us/windows/win32/shell/app-registration [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\OpenWithList\sublime_text.exe]
That doesn't seem to have done anything though, maybe the blog references a different registration feature or I'm misunderstanding something.
This registry key makes sure to add ST to the list of available applications in the "Open With..." dialog.
You still need to open the "Choose Other App..." dialog, select Sublime Text and open a file for Sublime Text to get added to the file's Open With... list as favourite.
I see, so that only saves me the once-per-windows-install looking for the sublime exe
I have also been missing this feature since I upgraded to Windows 11.
Problem description
With Windows 11, the new Explorer context menu no longer exposes any old style shell extensions. Sublime currently uses a registry entry to create "Open with Sublime Text" in the classic context menu, but this requires an extra click on "Show more options" before using it.
Preferred solution
Support IExplorerCommand and ship Sublime with a Sparse Manifest in order to allow "Open with Sublime Text" to appear on the new context menus. MS has a page detailing this here: https://blogs.windows.com/windowsdeveloper/2021/07/19/extending-the-context-menu-and-share-dialog-in-windows-11/
Alternatives
While the existing menu option can be accessed through Shift+F10, or the Show More Options option, its an extra click for something I'm doing fairly frequently.
There are third party solutions to restore the original context menu and all of its warts, but hopefully more programs will update similarly as Windows 11 begins to roll out.
Additional Information (optional)
Posted a thread with some screenshots and some further explanation on the ST forums before being directed here: https://forum.sublimetext.com/t/open-with-sublime-text-in-windows-11/60895
Note that W11 is currently available to people in the "Release Preview Channel" which means that the builds are generally final, or close to it, compared to the Dev or Beta channels.