Syntax highlighting for .tid files in the Linux command line

67 views
Skip to first unread message

MaxGyver

unread,
Feb 1, 2020, 11:38:27 AM2/1/20
to TiddlyWiki
Hi all,

I use TiddlyWiki5 with Node.js. That means that I've got one .tid file per tiddler on my hard disk. When I want to edit a file without a browser, I use this plugin for vim. But sometimes I just want to print a file's content with syntax highlighting. Usually I use bat, pygmentize or highlight for this but none of these seems to support TiddlyWiki syntax. bat uses the syntect library for syntax highlighting which uses Sublime Text syntax definitions and I found a Sublime 3 syntax file for TiddlyWiki5 *.tid files but apparently it's not of that type of Sublime syntax files that syntect understands.

I started to create my own syntax file for pygmentize/Pygments (based on the Markdown syntax file). I'm just wondering if I'm really the first one who wants .tid syntax highlighting for the console (for bat or pygmentize or highlight). Maybe this already exists and it's just named differently? TiddlyWiki writes about WikiText. Is this a standardized markup language? Or just a generic word for a "wiki markup language"? Or is there any other syntax highlighter for Linux that supports TiddlyWiki5/WikiText?

Best regards,
Max

MaxGyver

unread,
Feb 10, 2020, 3:29:24 PM2/10/20
to TiddlyWiki
Just in case somebody else is interested in syntax highlighting for .tid files in the terminal:

I have created a pull request for Pygments adding a TiddlyWiki5 lexer:

Reply all
Reply to author
Forward
0 new messages