3

Jeff's answer in Syntax highlighting language hints lists many languages, but Tcl isn't there; however, Tcl syntax highlighting is supported if you use the tag. (Ref: How to collect the output of man command in tcl

Could we get support for syntax-hinting support for Tcl?

I'd like to be able to use

<!-- language: lang-tcl -->
2

There isn't any built-in support for TCL that's getting applied just because of the tag. The answer in the linked question is simply being highlighted using the lang-default style:

set output [exec man cmd-name]

Unfortunately, that's probably not good enough for properly highlighting all TCL code. You might try something like lang-sh, but the result may not be perfect, either.

Stack Overflow uses Google's Code Prettify project for the syntax highlighting support. It is a separate project from the Stack Exchange sites, and maintained by mostly different people.

As I advised Lukas to do here, you will have to either submit a feature request to Prettify and wait for the TCL language to be implemented, or submit a style containing support for the language yourself. Once Prettify is updated, the latest version can be deployed across the network, and you'll be able to specify lang-tcl hints as you please.

  • A side-note: while I support this question in general, when we switched to using different styles in Prettify I asked that Tcl be explicitly mapped to lang-default (rather than none? I forget the exact details) as default's not too awful. – Donal Fellows May 24 '11 at 14:53
  • @Donal: I'm not sure I understand what you mean. Prettify uses lang-default now. Do you mean that you're responsible for this change from an earlier question? Did it previously default to lang-none? I don't know of any other language that does that; why should Tcl be that way? – Cody Gray May 24 '11 at 14:58
  • Things changed around a fair bit at the time that Prettify was introduced fully. At one point, it was most certainly defaulting to none. It may have got changed since then; I prefer to avoid fiddling around with meta-work. :-) – Donal Fellows May 24 '11 at 15:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .