microsoft / vscode

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

Alt+F, A (i.e., Save As) triggers source R file #173191

Closed kendonB closed 10 months ago

kendonB commented 1 year ago

Type: Bug

Note that this may be a bug in an extension - I am not 100% sure which.

The keyboard shortcut in Default Keybindings:

{ "key": "ctrl+shift+s",          "command": "r.runSource",
                                     "when": "editorTextFocus && editorLangId == 'r'" },

To reproduce

  1. Open and Save a .R file
  2. Press Alt+F, A The script gets sourced when it should trigger Save As.

VS Code version: Code 1.74.3 (97dec172d3256f8ca4bfb2143f3f76b503ca0534, 2023-01-09T16:57:40.428Z) OS version: Linux x64 5.18.0-051800-generic Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|12th Gen Intel(R) Core(TM) i7-1270P (16 x 2080)| |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: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|2, 2, 1| |Memory (System)|31.05GB (19.58GB free)| |Process Argv|--unity-launch --crash-reporter-id 109ba974-f9f3-4dd2-ae16-615ad0e4b375| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|ubuntu-xorg| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|ubuntu-xorg| |XDG_SESSION_TYPE|x11|
Extensions (23) Extension|Author (truncated)|Version ---|---|--- path-intellisense|chr|2.8.4 copilot|Git|1.71.8269 gc-excelviewer|Gra|4.2.56 path-autocomplete|ion|1.23.1 language-julia|jul|1.38.2 csharp|ms-|1.25.4 isort|ms-|2022.8.0 python|ms-|2022.20.2 vscode-pylance|ms-|2023.2.10 jupyter|ms-|2022.11.1003412109 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.14 vscode-jupyter-cell-tags|ms-|0.1.6 vscode-jupyter-slideshow|ms-|0.1.5 cmake-tools|ms-|1.13.45 cpptools|ms-|1.13.9 cpptools-extension-pack|ms-|1.3.0 quarto|qua|1.61.0 r-debugger|RDe|0.5.2 r|REd|2.7.0 tabletopsimulator-lua|rol|1.1.3 lua|sum|3.6.9 cmake|twx|0.0.17 (1 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 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 azure-dev_surveyone:30548225 pyindex848:30577860 nodejswelcome1:30587005 3biah626:30602489 89544117:30613380 pythonsymbol12cf:30657549 ```
ulugbekna commented 10 months ago

Hi @kendonB :-)

Thanks for filing this issue!

  1. Could you provide your keybindings.json file contents? (invoke command "Preferences: Open Keyboard Shortcuts (JSON)" to open it)

Could you please try the following:

  1. Run the command "Developer: Toggle Keyboard Shortcuts Troubleshooting" (you can, for example, run it from the Command Palette).

    This will activate logging of dispatched keyboard shortcuts and will open an output panel with the corresponding log file.

  2. Press exactly the keybinding you desire

  3. Check what VS Code detects

If you are having trouble understanding the output, please feel free to paste here and we'll be happy to help ☺️

vscodenpa commented 10 months ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

kendonB commented 10 months ago

Now that RStudio supports github copilot, VSCode probably isn't the right thing for R coding in general (I have switched back). Happy for this to be closed.