syntax highlighting

th
theleo
Posts: 28
Joined: Sat Mar 10, 2012 8:17 pm
Platform: Mac

Sat Mar 10, 2012 9:18 pm Post

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

jr
jravan
Posts: 212
Joined: Fri Apr 08, 2011 2:15 pm
Platform: Windows

Sat Mar 10, 2012 10:23 pm Post

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.

th
theleo
Posts: 28
Joined: Sat Mar 10, 2012 8:17 pm
Platform: Mac

Sun Mar 11, 2012 12:12 am Post

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..

mb
mbbntu
Posts: 1081
Joined: Wed Aug 01, 2007 9:44 am
Platform: Mac + iOS
Location: Cambridge, UK.

Sun Mar 11, 2012 9:49 am Post

theleo wrote:I'd be happy to spend 20-30$ extra dollars for the syntax highlighting & nice code-representation features


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.
You should judge people not by how close they get to the top, but by how far they have come from the bottom. Some people have a mountain to climb just to get to the place where others start out. (Me, 2010)

Ni
Niran
Posts: 73
Joined: Wed Jun 20, 2007 1:28 pm

Sun Mar 11, 2012 2:06 pm Post

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

Ju
Jura
Posts: 56
Joined: Wed Mar 07, 2012 4:12 pm
Platform: Windows

Sun Mar 11, 2012 4:38 pm Post

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 :) )

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

scr.11-03-2012 17.39.00.png
scr.11-03-2012 17.39.00.png (8.46 KiB) Viewed 950 times


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

jr
jravan
Posts: 212
Joined: Fri Apr 08, 2011 2:15 pm
Platform: Windows

Mon Mar 12, 2012 3:20 am Post

:o

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!