TW5: 5.1.11 How to do code block in markdown?

65 views
Skip to first unread message

Chuck R.

unread,
Nov 11, 2016, 9:50:57 AM11/11/16
to tiddl...@googlegroups.com
I'm using Firefox v49.0.2 on Windows 7.

I'm familiar with Markdown but I'm having some trouble making a block of code. First, when the Tiddler is a markdown tiddler, when I select several lines of text, I can't hit TAB to indent the text because the tab key takes the cursor out of the Tiddler main text area. I also tried delimiting my code block with three backticks like this:

```
this is code
more code
```

And that didn't work quite right either.

So how do I insert 4 spaces before all the lines that I select?

I'm using the Markdown support native to TW, not the Markdown add-on thing.

Thank you.

Jeremy Ruston

unread,
Nov 11, 2016, 9:56:17 AM11/11/16
to tiddl...@googlegroups.com
Hi Chuck

The easiest way to insert tab characters is to install the CodeMirror plugin, which allows you to type them as usual. Alternatively, as a quick and dirty solution, you can copy a tab character from somewhere else and then paste it in.

Best wishes

Jeremy

On 11 Nov 2016, at 14:50, Chuck R. <wedding...@gmail.com> wrote:

I'm familiar with Markdown but I'm having some trouble making a block of code. First, when the Tiddler is a markdown tiddler, when I select several lines of text, I can't hit TAB to indent the text because the tab key takes the cursor out of the Tiddler main text area. I also tried delimiting my code block with three backticks like this:

```
this is code
more code
```

And that didn't work quite right either.

So how do I insert 4 spaces before all the lines that I select?

Thank you.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/cd75cf2c-26e9-469f-8986-c8b710149e1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chuck R.

unread,
Nov 11, 2016, 10:04:39 AM11/11/16
to TiddlyWiki
Ok. In the future, if the Tiddler is in markdown, can we have an option to treat the tab key as inserting 4 spaces? That would really help. Or just have markdown code blocks delineated by 3 or 4 backticks.

Thanks!

Reply all
Reply to author
Forward
0 new messages