5

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

devios1
  • 715
  • 1
  • 5
  • 10
  • 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. – devios1 Jun 25 '11 at 22:32

2 Answers2

3

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

RyanWilcox
  • 353
  • 1
  • 8
0

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.

devios1
  • 715
  • 1
  • 5
  • 10