Nice! Working brilliantly.
Quick HTML Anchors in TextMate
Note: This post is over a year old. You may want to check later in this blog to see if there is new information.
The following links are auto-generated but may help you locate newer content:
I had to make a couple of long indexes today, so after a couple of tries and some input from the TextMate list, I came up with a pair of commands for creating named HTML anchors in TextMate…
Both commands are currently bound to ⌃-⇧-R, which may be something else’s shortcut but I haven’t tracked it down yet. In an HTML document, pressing the shortcut brings up a menu that lets you choose to insert an anchor or a link to an anchor. If you’re inserting an anchor, a snippet is created with a suggested name based on any text you had selected, which can then be edited. If you’re creating a link, a palette pops up showing you all of the anchors in the document and allowing for quick linking to any point in the doc.
Download, unzip and double click the two commands to install them.
Download: anchorcmds.zip
-
07.11.07 / 11pm
-
07.12.07 / 4pm
Nice little time saver Brett. You did this at the perfect time, I’m just about to markup my company’s rules, regulations, and policies for the new website (and there is a lot of ‘em). Thanks!
-
09.19.07 / 12pm
I replaced the name attributes with ids, to make it a little more XHTML compliant.
Initially, I was looking for a TOC command that intelligently updates the summary, as the document grows, like Amaya has it.That is a little different, but in my opinion, the html, textile and markdown bundles should all have this command for their own default language.
That would make working on large single documentation files, that neeed to be compiled to pdf format easier.
Thanks for sharing your work, Brat.
regards, marios
-
09.19.07 / 2pm
You know there’s a whole bundle that sprouted out of this, right?
http://blog.circlesixdesign.com/2007/07/17/html-indexing-gets-better/
It still needs some work, I kind of stopped developing it when other projects came up. It does have some intelligent indexing though, and I’ve used it to handle some pretty large documents. It actually converts to markdown and back to handle nested listing more easily, so outputting markdown would simply be a matter of commenting out the second conversion… take a look.
-
09.20.07 / 12pm
It seems, I had misspelled your name. Sorry for that. The Bundle is quite helpfull.
I’ve build a macro based on it that helps me to wrap the classes, that it needs for the prince pdf output.The two create hierarchical index commands however didn’t work for me yet.
It would be interesting to get Allan’s opinion about such an inclusion in version 2 of TextMate.
I left a post on the mailing list about this subject.
regards, marios
Have your say
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

5 Comments
Jump to comment form | comments rss [?] | trackback uri [?]