Open kaare-mikkelsen opened 3 years ago
Hey @kaare-mikkelsen, thanks for reporting. Please update Spyder to see if that helps. You can do that by closing Spyder, opening the Anaconda Prompt and running there
conda update anaconda
conda install spyder=4.2.1
Let us know if that helps.
I ran:
conda update anaconda conda install spyder=4.2.1
In conda prompt.
It ran for a very long time, and ended up listing a lot of conflicts. After finishing, spyder is still not upgraded. Unfortunately, I closed the prompt, so I do not have the (very long) list of apparent conflicts.
do you need me to run it again?
I think you need to reinstall Anaconda and run again
conda update anaconda
conda install spyder=4.2.1
Please see the second part of our video to learn how to do that properly.
hi again :)
this worked, in regards to updating spyder. it is now version 4.2.1
however, this has not changed my issue with changing 'toggle comment'. For comparison, I just tried changing 'run' from f5 to ctrl+R, and that worked fine. so it seems to be the commenting in particular?
Ok, thanks for updating Spyder and confirming that our latest version doesn't fix the problem. We'll take a look at this in a future release.
Just switched to Spyder today and found the same bug where key bindings for (un)commenting to Ctrl+R do not work. I wonder if it has to do with the 'editor' context (since e.g. the run command can be succesfully binded tot Ctrl+R).
If you could give me some pointers as to where to look in the source code, I'm happy to attempt to find the root cause myself.
Hi @TeunBartelds I think there is an undetected conflict with the shortcut for the find_replace
widget replace text
action. If you change that shortcut too you will be able to bind Ctrl + R
to be the editor
toggle comment
action
Thank you @dalthviz , this resolved the issue for me.
I guess the actual issue could then boil down to the fact that the context
for find_replace
should be changed to editor
? Or at least their bindings should be mutually exclusive.
Glad the workaround is working for you @TeunBartelds ! I would say that yes, the bindings should be mutually exclusive and show a warning message for a found conflict (in fact any plugin that uses the find and replace widget should check for conflicts with the shortcuts set to it and their own shortcuts).
This bug still exists for me:
Spyder 5.5.0 installed through mamba OS: Arch Linux 6.7.0 Python 3.11.5
The workaround by @dalthviz, however, works flawlessly.
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
when I go into tools -> preferences -> keyboard shortcuts, and change 'toggle comment' to 'CTRL+R', that doesn't work. After I change the shortcut to CTRL+R, CTRL+1 stop's working (as it should). But not nothing happens when I press CTRL+R. When I change the shortcut back to CTRL+1, that works again as expected.
Versions
Dependencies