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.
Is there a way to highlight text in editor and preview
-
Editorial has some support for CriticMarkup, and you can highlight a piece of text using this syntax:
{==highlighted text==}
. This works both in the editor, and in the preview. You can also use{++text++}
for additions (highlighted in green) or{--text--}
for deletions (red). -
thanks for the quick reply and turning me on to critical markup which i never heard about!. it does exactly what i want on the display side of things and even more since it has multiple colors!
BUT it's actually going to be quite impractical in real use on the insertion side in editorial if i have to type those 6 characters around everything i want to highlight. this would be the case even i had an actual keyboard attached. fyi, i do a lot of highlighting in my documents so i need to be able to do this quickly and more importantly easily, especially without a keyboard.
SO... is there a way to assign a function to an editorial keyboard button or popup menu so that when you select some text in editorial, you can simply click the button to automagically wrap the text with one of the choices of 6 characters you mentioned? that WOULD be practical :)
one last thing: those six extra characters start eating up a lot of screen real estate and effecting the readability of the file in the editor (which is why having something like :: or __ would be preferable as a replacement for the three {++, {==, {-- etc)) so perhaps there is a way to change what critical markup / editoral considers the highlight tags to be (ie my preference for :: or __ vs {++, etc)?
thanks
-
You can use snippets to enter those characters more quickly. Simply add a snippet that contains
{==[Selected Text]==}
(where [Selected Text] is a placeholder from the Variables... popup). Then you can select some text, insert the snippet, and the selection will be surrounded by{==
and==}
.Regarding your other question, it's not possible to customize this syntax.
-
This post is deleted! -
You can do it from the keyboard snippets.
-
ah. i didn't realize you had the vars with the snippets. great! thanks
-
I can't seem to get this to show anything but the literal {== ==} characters in the preview. I tried creating a brand new preview theme with zero customizations in it to be sure I wasn't adding any roadblocks.
Is there a setting I need to turn on? Is there a better theme I need?
-
@BoxOfSnoo There is no setting you'd need to turn on. Does it work in the editor?
-
i know editorial supports critical markup per this thread. however, i would like to change the normal == markers used for criticmarkup highlight to my own custom tags :: (double colons).
- is this possible if so how?
- also how can i change the default syntax colors used for text highlight on text surrounded with == markers
if i can't edit the default rules supplied with editorial for == and i must use my custom snippet approach described above to wrap :: for highlight, then
- how / where do i add a syntax color highlight for text surrounded by double colons (::) in the editorial's normal edit view?
finally, vim syntax configurations allow you to "conceal" the extra md characters that are used in wrap pairs like bold, italic, bold + italic (ie unless you are on the line being edited, you do NOT see the characters in the normal edit view.. which is great b/c it makes reading the md documents easer to read and work with after you've edited the document by placing the bold, italic, etc marks). editorial goes half way there, by "dimming" (reducing the transparency) of the special md markup characters but not entirely removing them from the display. it's good but if you have md wrap pairs that consist of multiple characters (like critical markup and bold+italic (three asterisks), they start cluttering up the text and make it hard to read.
- so is it possible to "conceal" md marker pairs in editorial like vim in normal mode and if so how /where?
thx!
-
You could write using the ::highlight markup:: and then use a snippet to convert those into CriticMarkup format for previewing. If you wanted to get reallynfancy, you could create a workflow to convert and then show the preview, without altering the original document. Then always use hat workflow to preview.