The Omni Group Forums

The Omni Group Forums (
-   OmniOutliner for iPad (
-   -   Send to app as Plain Text (tabs vs spaces) (

RobTrew 2012-11-01 04:50 AM

Send to app as Plain Text (tabs vs spaces)
I find that tab-indented text outlines work better than multiple-space indents for interchange with other apps (through file or clipboard).

Whereas the OS X OmniOutliner offers tab-indented text export, the iPad app's [B]Send to app as Plain Text [/B] only offers multiple spaces, which for example, are not recognised as logical indents when pasted into something like Cotton Notes, and are interpreted as code paragraphs by Markdown-idiom editors like FoldingText.

A tab-indented text export would would allow iOs OO to get much more use than it currently does on my iPad.

(It already does a very good job of [I]reading[/I] tab-indented text the asymmetry seems a pity )


RobTrew 2012-11-01 05:01 AM

I guess one could write a line or two of clipboard-transforming Python in [URL=""]Pythonista[/URL] in the meanwhile, but it seems a little circuitous ...

RobTrew 2012-11-01 12:18 PM

FWIW the iPad clipboard can indeed be transformed with something like this (run in [URL=""]Pythonista[/URL]).

[CODE]import clipboard, re

str_clip = clipboard.get()

# Translate each sequence of 4 spaces to a tab
str_clip = re.sub(' ', '\t', str_clip)
# Unbreak wrap-broken lines (look for residual spaces after tab)
str_clip = re.sub('[\r\n]+\t* ',' ', str_clip)
# Add Markdown bullets between tab and text ? iOS OmniOutliner adds them anyway ...
# str_clip = re.sub(r'^(\s*)(\S)', r'\1- \2', str_clip, flags=re.MULTILINE)
# Prune duplicate space
str_clip = re.sub(r' {2,}', r' ', str_clip)


bruceathome 2012-12-13 02:44 PM

Thanks Rob - very useful - informed me a out pythonista too, which looks quite useful.

All times are GMT -8. The time now is 01:50 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.