On Wednesday, September 7, 2011, Oliver Taylor <[email protected]> wrote:

Here's what I've got so far:

1. A script attached to the save event (or something) scans the open document for a regex pattern. 2. This script creates a ctags file from the regex matches in BBEdit's "Completion Data" folder, and adds some predefined ones to the list.

Would a ctags file work this way?

Yes, if properly formatted. (See below.) Though as a side note, I would recommend writing the tags file into the file's parent directory (or one of its ancestors), rather than into the central Completion Data folder. It might also be desirable to munge the ctags file carefully, and only rewrite entries that pertain to that particular file. (Left as an exercise for the reader.)

Would this be flexible enough to get pretty much anything in a completion pop-up?

Probably. There's lots of baked-in support for ctags in BBEdit.

Can the ctags file be in simple enough format that a simple ruby
script could generate it?

Absolutely.

Is this a crazy way of getting competitions in prose?

Possibly. But it sounds kind of awesome. (Mostly because you could use it for *anything*, not just prose.)

If you're going to generate ctags files yourself, you need to read this: <http://www.bbeditextras.org/wiki/index.php?title=Advanced_ctags_hacking>.

Enjoy,

R.
--
Rich Siegel                                 Bare Bones Software, Inc.
<[email protected]>                      <http://www.barebones.com/>

Someday I'll look back on all this and laugh... until they sedate me.

--
You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to