[TW5] Syntax highlighting / CodeMirror not working for me

475 views
Skip to first unread message

Hegart Dmishiv

unread,
Feb 15, 2016, 9:32:47 PM2/15/16
to TiddlyWiki
I have two {{DesignWrite}} TW5 instances[1][2] and my offline TW5 instance, all of which have the CodeMirror and the Highlight.js plugins installed. None of my TW instances have syntax highlighting working when I edit a tiddler. I can't even see syntax highlighting on the plugin demo site. I've tried it from both Firefox v44.0 and Midori web browsers. I'm running Lubuntu v14.04 LTS as my operating system. Is there something else I need to enable in order to get syntax highlighting to work properly?

HC Haase

unread,
Feb 19, 2016, 8:51:48 AM2/19/16
to TiddlyWiki

I have the same problem though highlight work when the text field is set to some code (java, html etc).

Code mirror gives me line-numbers, but non of all that nice stuff like closing bracket and all that.


I didnt enable any thing.

Jed Carty

unread,
Feb 19, 2016, 9:42:53 AM2/19/16
to TiddlyWiki
I am not aware of anything that gives syntax highlighting or completion to the tiddlywiki editor.

BJ

unread,
Feb 19, 2016, 11:39:48 AM2/19/16
to TiddlyWiki
Hi Hegart,
you need to look at the tiddler $:/plugins/tiddlywiki/codemirror/usage to see how to setup using a config tiddler ($:/config/CodeMirror)


all the best
BJ

Hegart Dmishiv

unread,
Feb 19, 2016, 12:30:12 PM2/19/16
to TiddlyWiki
Aha! Thanks for that BJ. I was wondering what was going on. The instructions for this only say:

 "To add the plugin to your own TiddlyWiki5, just drag this link to the browser window"

Nothing about having to configure it. I'm going through the configuration process now. The documentation for this definitely needs to be better, not the internal documentation that you pointed me to, but the fact that there even is internal documentation, and configuration required, needs to be pointed out for us n00bs!

Hegart.

Hegart Dmishiv

unread,
Feb 19, 2016, 4:24:40 PM2/19/16
to TiddlyWiki
Hi BJ,

I've gotten the Basic working configuration to work, with bracket matching, but I can't get Add closing brackets to work. It comes up with a red Javascript error every time I use it. There must be a simpler way to use this thing, rather than having to add bits and pieces of raw Javascript code to my TiddlyWiki to make it work? Has someone got a working configuration that I can just pull into my TW instance, to get the bracket closing and WikiText syntax highlighting to work?

Hegart.

BJ

unread,
Feb 19, 2016, 5:02:16 PM2/19/16
to tiddl...@googlegroups.com
I would guess that the version of codemirror in the tiddlywiki extension is not the same as is on the codemirror site. - I have had a quick look at the code and cannot see a version number! - it has been in the tw repo on github for a couple of years....

I guess we will have to live without bracket matching at this time. It needs to be raised as an issue.

Hegart Dmishiv

unread,
Feb 19, 2016, 5:04:59 PM2/19/16
to TiddlyWiki
As I say above, the bracket matching is working fine, but not the bracket auto-closing. Thanks for looking into this, BJ.

Hegart.


On Saturday, 20 February 2016 11:02:16 UTC+13, BJ wrote:
I would guess that the version of codemirror in the tiddlywiki extension is not the same as is on the codemirror site. - I have had a quick look at the code and cannot see a version number! - it has been in the tw repo on git hub for a couple of year....

BJ

unread,
Feb 19, 2016, 5:46:38 PM2/19/16
to tiddl...@googlegroups.com
oops l Meant to say auto-matching - its getting late...

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/pi4TbvjRplM/unsubscribe.
To unsubscribe from this group and all its topics, 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/ad38cee1-13d2-427b-80a9-6c7a37ad5bf7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Jeremy Ruston

unread,
Feb 20, 2016, 5:32:33 PM2/20/16
to tiddl...@googlegroups.com
The CodeMirror plugin is quite unloved and out of date. Please shout if anyone is interested in taking on lead developer for it. Failing that, updates to the docs would be very welcome,

Best wishes

Jeremy

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.

Hegart Dmishiv

unread,
Feb 20, 2016, 5:46:17 PM2/20/16
to TiddlyWiki
Hi Jeremy,

What's not to love about bracket matching, automatic bracket closing, and syntax highlighting within the TiddlyWiki editor? I'm so looking forward to getting this working properly, it will be a nice change from the drab text I'm faced with at the moment when editing a tiddler.

I'm not putting my hand up to bring the plugin up to spec, as I'm sure that will require someone who has Javascript experience. However, I'm happy to be a tester for it.

Hegart.
Reply all
Reply to author
Forward
0 new messages