microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.07k stars 29.21k forks source link

"Open with" is available only for files under the open folder, not under Open Editors #162488

Closed davisjr closed 2 years ago

davisjr commented 2 years ago

Type: Bug

"Open with..." menu item is available only when a folder is opened. This makes it impossible to switch editors for individual files opened directly from File Explorer or File -> Open File.

Pre-requisites:

Repro steps:

Actual: There is no "Open with..." entry in the context menu.

Expected: "Open with..." is available so that I can switch the editor used.

Notes: The "Open with..." menu item shows up if I open the folder instead and right click the file under the folder tree. This works as expected. But this means I can't switch editors if the file was directly opened from File Explorer or File -> Open File

VS Code version: Code 1.71.1 (e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb, 2022-09-08T19:56:36.424Z) OS version: Windows_NT x64 10.0.22622 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz (8 x 2304)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|15.73GB (6.92GB free)| |Process Argv|C:\\Users\\davisj\\Desktop\\vscode-bug.md --crash-reporter-id e8831160-9c4e-4b23-ab9a-8e4529050aeb| |Screen Reader|no| |VM|0%|
Extensions (54) Extension|Author (truncated)|Version ---|---|--- vscode-intelephense-client|bme|1.8.2 regex|chr|0.4.0 xml|Dot|2.5.1 gitlens|eam|12.2.2 prettier-vscode|esb|9.9.0 codespaces|Git|1.10.6 copilot|Git|1.49.6911 vscode-pull-request-github|Git|0.50.0 gc-excelviewer|Gra|4.2.56 vscode-graphql|Gra|0.7.5 vscode-graphql-syntax|Gra|1.0.4 prettier-sql-vscode|inf|1.3.1 sftp|lix|1.12.10 ftp-sync|luk|0.3.9 databuild2|mic|1.1.734 fluent-icons|mig|0.0.18 ecdc|mit|1.8.0 vscode-mjml|mjm|1.0.5 theme-monokai-pro-vscode|mon|1.1.21 vscode-apache|mrm|1.2.0 vscode-azureappservice|ms-|0.24.4 vscode-azureresourcegroups|ms-|0.5.6 vscode-cosmosdb|ms-|0.19.2 csharp|ms-|1.25.0 dotnet-interactive-vscode|ms-|1.0.3452020 vscode-edge-devtools|ms-|2.1.1 python|ms-|2022.14.0 vscode-pylance|ms-|2022.9.40 jupyter|ms-|2022.8.1002431955 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.9 vscode-ai|ms-|0.20.0 vscode-ai-remote|ms-|0.18.1 remote-containers|ms-|0.251.0 remote-wsl|ms-|0.66.3 azure-account|ms-|0.11.1 powershell|ms-|2022.8.5 vscode-typescript-tslint-plugin|ms-|1.3.4 vscode-react-native|msj|1.9.3 vscode-sanddance|msr|4.0.1 sqltools|mtx|0.25.1 indent-rainbow|ode|8.3.1 material-icon-theme|PKi|4.20.0 vscode-thunder-client|ran|1.19.3 project-snippets|reb|0.5.0 vscode-commons|red|0.0.6 LiveServer|rit|5.7.9 rest-book|tan|6.2.1 ms-teams-vscode-extension|Tea|4.0.6 html-preview-vscode|tht|0.2.5 glean|wix|5.2.2 php-debug|xde|1.28.0 vscode-scope|yiw|0.0.29 material-theme|zhu|3.15.5 (6 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411cf:30557515 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 azure-dev_surveyonecf:30548226 i497e931:30553904 i5d37513:30580093 pyindex848:30577860 40g7c324:30573242 ```
vscodenpa commented 2 years ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.71.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

mjbvz commented 2 years ago

You can run this command from the command palette or by right clicking on the editor tab:

Screen Shot 2022-10-03 at 4 38 52 PM

Will also add it to the open editor context menu

mjbvz commented 2 years ago

Fixed by c9338005f7210e26c529891f21a85d26a2bebc87