Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Comment Line shortcut?
-
I am new to the editor and absolutely love it.
Though I am wondering if there is a keyboard shortcut for commenting line? I find the code snippet that does it, but I am wondering how can I convert it into a keyboard shortcut so I can use it when I am developing?
-
Yes. The key is
#
;-) -
Can you please post the code snippet that does it?
-
@ccc It's one of the examples in the
editor
module documentation. -
Hi,
the short and probably most useful answer is : 'No, you cannot.' The longer answer is : Pythonista does not allow custom virtual keyboard shortcuts at the moment. It is however possible to register shortcuts for physical keyboards programmatically - with some limitations/problems (for details see [1]). You can also head over to the recent Python 3.6 and A better keyboard threads where you will find partially a discussion on the very thing you want to do. @omz said he might consider it, but as always things are mostly tied to demand, so if you want to see some virtual keyboard customization you might want to express your whishes there (or more officially on github).
[1] https://forum.omz-software.com/topic/3156/editor-configurability/2
-
Since you said you are new to Pythonista, I will also point out the option of adding the script to the action ('wrench') menu, where it is only two taps away.