I remember back in my CodeWarrior days, it was possible to add entries to the code navigational menu using #pragma mark directives, which made it easy to organize your code file into sections visible in the menu.

Is there any such way to do this in BBEdit, specifically in JavaScript files?

enter image description here

link|improve this question
Voted to close and move to Stack Overflow - that's where the programmers hang out. – Linker3000 Jun 24 '11 at 16:31
It's not really a programming question though, so I didn't want to post there. It's really just a question about the BBEdit application. – chaiguy Jun 25 '11 at 22:32
feedback

2 Answers

up vote 2 down vote accepted

BBEdit supports #pragma mark for non-C languages, actually.

See the entry on the bbedit-hints blog on this topic.

Also: some other prefixes work (TODO, for example).

link|improve this answer
Brilliant! That's exactly what I was looking for! – chaiguy Nov 28 '11 at 14:49
Omg it even supports divider lines with "#mark -"! Amazing! :) – chaiguy Nov 28 '11 at 14:51
feedback

Well it's not an ideal solution, but I did find a way to add bookmarks to a file by parsing it with a regular expression. You can then start lines with a certain character sequence that you want to represent a mark.

enter image description here

(Here I'm using a triple-slash to identify a bookmark.)

The problem is you have to run this manually each time you want to build the menu--it doesn't update automatically.

It also doesn't support "-" divider lines like CodeWarrior used to. Bummer.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.