[TxMt] Quickie HTML named anchors

Ethan H. Darling ethan at grokcodile.com
Wed Jul 11 13:33:40 UTC 2007


Thanks for the contribution.  Your command really came in handy this  
AM as I was index/anchoring a rather lengthy "job postings" page.   
(If there is something that already does this in TextMate I haven't  
seen it either.)
- Ethan

On Jul 11, 2007, at 8:08 AM, Brett Terpstra wrote:

> I had to whip this up this morning for a site that had a ton of  
> named anchor tags.  There may have been something previously but I  
> missed it.  If you highlight the text to link and hit CTRL-SHIFT-A,  
> it will give you a dialog with a suggested name for the anchor.   
> Confirming the dialog after any necessary modifications will create  
> the href link to the anchor and copy the name of the anchor to the  
> clipboard.  Then you place the cursor or highlight the text to  
> become the anchor and hit CTRL-SHIFT-A again.  It will create the  
> anchor from the clipboard.  This makes for rapid index development.
>
> The only drawback is that my current system of using the same  
> keyboard shortcut twice means if you hit undo after pasting the  
> anchor you lose the clipboard and have to start that anchor over  
> from the beginning.  It may be wise to separate the two functions,  
> but I didn't want to take up more shortcuts than necessary ;).
>
> Brett
>
> <Create Anchor.tmCommand>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate




More information about the textmate mailing list