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.
Editor configurability?
-
Curious as to how configurable the editor is. I'm using an iPad Pro + the apple smart keyboard and would love to make various emacs-y things work correctly. This begs two questions:
-
Is there a 'cheat sheet' around for the current editor keyboard configuration? Some of the 'smart' keyboard features (like the = -> != for example) don't seem to work when I have the Smart Keyboard attached, so it would be nice to know what does what etc.
-
It appears that the editor is, itself, python. Are there configuration options somewhere?
-
-
If you hold down the command key, iOS will display an onscreen list of all key bindings. This works with any app that has hardware keyboard shortcuts under iOS 9. From my experience the list isn't always complete though, I don't exactly know why. Pythonista's is correct though as far as I can tell.
The editor is not written in Python, it's in Objective-C like the rest of the app. The
editor
module was previously a Python extension module written in (Objective-)C, now I think it's Python code that usesobjc_util
to work with the editor internals. -
Are you using the app store version, or the beta? I think some of these issues were recently fixed in the beta
The editor is written in objc, however the
editor
module has quite a few useful features for getting/setting text. There are a few undocumented functions in this module, so it might be worth opening the editor module to see what is there. You can navigate to Standard Library-> site-packages-> editor.pyWhile the editor is in objc, with the objc module, there is a fair bit of customization possible.
For instance, you can make your own keyboard shortcuts:
https://forum.omz-software.com/topic/2609/custom-keyboard-shortcuts
https://forum.omz-software.com/topic/2049/possible-to-subclass-uiview-and-redefine-keycommands-property/7You can create shortcuts to the add new file menu, or navigate direct to the file explorer
https://github.com/jsbain/objc_hacks/blob/master/addnewfileshowchooser.pyOne could put these customizations into pythonista_startup.py in site-packages to make them "permanent". Or run from the wrench menu.
-
Beautiful- Thanks for the pointers to that stuff! (Sadly, I can't quite get good 'search' results using the in-forum search, easier/better to Google externally... heh)
I'm using the AppStore version. I suppose I should ask to be put on the beta to try this out.