syntax highlighting

good day,

I’m a computer science student, I use Scrivener mainly for documenting my study progress and to keep track of code snippets.

It would be great to have syntax highlighting abilities for most common languages like c/C++/python/list exc…

E.g like a font that would recognize words exc… dun now how feasible this is to implement though…

Thank you

Leo

I’m a software engineer myself, Leo. I’m curious as to why you want this. You want to produce colored syntax examples in a user manual, perhaps? I honestly can’t see the use case. And it is a lot of work for a very niche user base.

Yea, for decent looking documentation of my lectures notes & bits of code that I learn along the way & re-use later. Highlighted syntax makes code enormously more readable.

I think every programmer likes to keep bits of code samlpes at hand, and there aren’t that many good tools for the job at hand. They’re all good for small bits of code, but become increasingly less useful when you scale up & get more code. I’ve used jCodeCollector for a while, but it’s not very scalable and is no good for documentation, only useful for actual bits of code.
This is where Scrivener shines and flourishes.

Personally, it would make a big difference for me, I’d be happy to spend 20-30$ extra dollars for the syntax highlighting & nice code-representation features… but then again not everyone is a programmer, so it’s not a universal feature I guess… I suppose it’s one of those “very nice to have” features… would certainly attract programmers attention I think…

Yes, but I wouldn’t! It would be of no use to me. There is no point in the developer losing customers by charging more for a product in order to incorporate a feature that most of them don’t want or need! It doesn’t make commercial sense.

And if you think of it in commercial terms, and the amount of money earned against the time put into something, then top of the list would probably be putting Scrivener into the main world languages, like Spanish, Russian, Chinese, etc. If I were Keith, I’d be putting localisation very near the top of priorities (though it also brings problems, like support in other languages) and code highlighting would be pretty near the bottom. But that is just my view.

Cheers, Martin.

Why not include a screen shot of the sytax highlighted file along with the appropriate code ?

I partly use Scrivener for writing articles about programming, but I don’t see added value in a syntax highlighter.

That being said, have you tried an editor like SciTE that allows to ‘Copy as RTF’? (see the supported language for SciTE on this page - probably your language is also there :slight_smile: )

That way, you can paste with syntax highlight in Scrivener:

scr.11-03-2012 17.39.00.png

Other editors might also have this option, but I’m only aware of SciTE having it.

:astonished:

Amazing! Mom said “Learn something new every day” and I just learned something! I didn’t know SciTE allows ‘Copy as RTF’! Fantastic! Thanks, Jura!