Is it currently possible to use Pythonista's keyboard to manipulate text selection? e.g. invoke selection of word closest to cursor/caret, extend selection, etc
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.
Posts made by jsamlarose47
-
PyKeys: text selection
-
RE: New Beta for Pythonista 3.3
Just to say: the new keyboard is opening up some really exciting possibilities, and aside from everything else that Pythonista offers, this is the kind of functionality I've been wishing for on the iPad for a long time now. I've tried a number of third party keyboards to do more with text in iOS and the vast majority of them have proven disappointing, but this... there's more possible than all of those others put together. Happy days ahead. Hats off to OMZ.
-
RE: Best way to get the list of files in my dropbox folder in editorial
Dropbox list: there are a few workflows in the directory that'll probably help you here, but as a starter, you can use something like:
p = editor.get_path() print(p)
...with a Dropbox file open in the editor to get the path.
UI module: I copied the stopwatch example from Pythonista into Editorial, no problems.
Installing modules: possible to an extent, but not as convenient as in Pythonista. See here: https://forum.omz-software.com/topic/3921/library-module-for-editorial-via-pythonista
-
RE: My new Pythonista dictionary app
Following up on this. Reinstalled Pythonista— figured the errors I was seeing might be an indication of some other issues with my set up. All's working fine now. ;)
-
RE: My new Pythonista dictionary app
@johnridesabike interesting. Jinja2 is indeed in my site-packages folder and not in either of my Standard Libraries. I'll see what I can do to upgrade...
Later: Okay. Stumped. Tried to update my Jinja2 via pip (stash). Response was that I have the most recent update. Edited jinja2/environment.py (as pointed out by ccc) but got another error:
File "/private/var/mobile/Containers/Shared/AppGroup/AF1E5A27-A567-45C1-A998-655B7A0E2B63/Pythonista3/Documents/site-packages/jinja2/environment.py", line 600 except TemplateSyntaxError, e: ^ SyntaxError: invalid syntax
Fixing the jinja2 errors one by one seems like it could be an exhaustive process, and I'm sure there's a more sensible way to get things up and running— sounds like there's a problem with my install of jinja2. Anyone have any further suggestions?
-
RE: My new Pythonista dictionary app
This sounds both really useful AND inspiring. I look forward to seeing what it's capable of.
Got this error when trying to run WordRoom.py
Traceback (most recent call last): File "/private/var/mobile/Containers/Shared/AppGroup/AF1E5A27-A567-45C1-A998-655B7A0E2B63/Pythonista3/Documents/projects/from GitHub/WordRoom-master/WordRoom.py", line 10, in <module> from jinja2 import Environment, FileSystemLoader File "/private/var/mobile/Containers/Shared/AppGroup/AF1E5A27-A567-45C1-A998-655B7A0E2B63/Pythonista3/Documents/site-packages/jinja2/__init__.py", line 37, in <module> from jinja2.environment import Environment, Template File "/private/var/mobile/Containers/Shared/AppGroup/AF1E5A27-A567-45C1-A998-655B7A0E2B63/Pythonista3/Documents/site-packages/jinja2/environment.py", line 575 info.external_attr = 0755 << 16L ^ SyntaxError: invalid token
Any suggestions?
-
RE: Task lists aka Todo lists
+1 for the Taskpaper app recommendation. If you're happy with Taskpaper mode in Editorial and looking for something to work with the same files on your Mac, it's a no-brainer.
That said, one of the (many) reasons I love Editorial is that it allows you to build your own solutions. You can implement your own basic support for simple Github style tasks in a workflow with three action steps:
1: extend selection (select the entire line)
2: find "[ ]" and replace with "[x]"
3: replace selected text (with input)Assign an approriate shortcut, then run this on any Github style task you want to mark done. You could, in theory, use this kind of thing to manage your tasks in a way that respects both conventions. Say, prefix your tasks with "- [ ]", then configure your "mark done" workflow to add both a "[x]" and a "@done" tag, though that would actually mean a little more work at the Mac end for comparable functionality.
Point is, even if the functionality you want isn't already baked in, with a little DIY, Editorial's a beautifully extensible app that allows for a lot of flexibility in setting things up in a way that makes sense for you.
-
RE: Editorial sync with Dropbox does not work
Sorry to hear about the sync issues. Did you see any greyed out files appearing in the file list? Have you tried to delete and reinstall?
As far as a selective sync goes: you can select a root folder in Dropbox to link to Editorial. This means you'll have access to files in folders and subfolders contained within that root.
-
RE: Editorial Backup broken
Hm. You may have sorted this by now, but it sounds like you've got an old version of that workflow? I just ran my regular back up with this one: and all seems well...
-
RE: Export different font size?
How are you exporting? If you're using a workflow, which one? There may well be a reference to some CSS in it somewhere that you can adjust...
FYI - if you haven't already found it, you can add or adjust preview templates by swiping left on the screen to preview, then tapping on the "Preview" title at the top of the page.
-
RE: Newbie text folding question
In Settings-->Editor-->General, make sure "Folding" is enabled (I can't remember if it's switched on by default).
In Taskpaper mode, Editorial recognises lines that end with a colon (:) as headings. In Markdown mode, lines that begin with hashes (#) are headings as per canonical Markdown. Taskpaper folding respects indent levels.
Folding can also be implemented via workflows, which allows you to set things up in a way that suits you, and to control folding irrespective of syntax mode. See the following examples:
http://www.editorial-workflows.com/workflow/5830937191383040/_eD31MsIIzo
http://www.editorial-workflows.com/workflow/5808136921284608/5vSeu1APl5w
http://www.editorial-workflows.com/workflow/5876841533407232/ruJGzB9j9aQ
http://www.editorial-workflows.com/workflow/5871227071627264/MnOqmin2fvk
-
RE: Duplicate/Copy a workflow
@CascadeHush If we're talking about templating blocks of functionality from within workflows, then yes, presets work nicely— something I only discovered myself recently. In order to set a whole sequence of workflow steps as a preset, I've sometimes used "if" blocks as wrappers/containers. Put the steps you want to keep as a reusable block in an "if" block, set that as your preset, then unpack them in your new workflow when needed.
Almost forgot: "sub-workflow" might also be helpful in this context?
-
RE: Keyboard shortcut to move current line/selection up or down, like in most code editors, iawriter, microsoft word
Glad they work for you. ;)
- Auto-deselect if nothing's been selected: pretty easily done (updates now available via v2 links previously posted).
- Cursor position in line: that's a little more challenging for me. Range math in Editorial hurts my brain.
- First line / last line bugs: noted that in v1, but shouldn't be a problem in v2. Can you confirm you were using v2 when you saw this issue?
- Non-destructive handling of items: v2 tries to be a bit smarter about indents. I acknowledged in the description that If you select a block of text that doesn't have a # in it (very simple check for markdown/taskpaper headers), the workflow will trim whitespace from each item/line and attempt to reconstruct indents depending on where the block is moved to. Admittedly not so good for blocks of items with variable indentation. Workaround for now: insert a # anywhere in the block you want to move to skip any trimming— that'll just move the blocks as they are.
-
RE: Keyboard shortcut to move current line/selection up or down, like in most code editors, iawriter, microsoft word
Update: V2 auto-indents individual items with respects to header levels. Also maintains selection so you can fire the shortcut repeatedly in quick succession (doh!)...
Up: http://www.editorial-workflows.com/workflow/5900619277664256/SONfDKRJ4VM
Down: http://www.editorial-workflows.com/workflow/5910247084392448/sEf36J2wCuY -
RE: Keyboard shortcut to move current line/selection up or down, like in most code editors, iawriter, microsoft word
Up: http://www.editorial-workflows.com/workflow/5900873318268928/jTSfUw5xcs8
Down: http://www.editorial-workflows.com/workflow/5812251499954176/gxIFRX9kMvICouldn't find the originals, so put these together. Could be improved, but should offer a basic solution. I love the fact that Editorial allows you to put this kind of thing together so quickly!
-
RE: Keyboard shortcut to move current line/selection up or down, like in most code editors, iawriter, microsoft word
I did put together a workflow like this, but never published it— I originally thought a shortcut would be useful when using an external keyboard, but went through a phase of trying to minimalist my workflow list, and decided to rely on the existing drag handles instead. If I’ve got it archived anywhere, I’ll post it... (but please don’t hold breath in anticipation!)
-
RE: Workflow to search and move the caret?
The built-in find command should select the entire matched word...
-
RE: Dropbox file versions...
Ah— good to know I'm not going crazy! Sad to see it go. It was one of the “above and beyond” features that added a little extra shine to Editorial for me. That said, it’s not a feature I use every day. I certainly wouldn’t mind seeing it make a return in a future release, but I can appreciate the drive to pull back on underused features.