[TxMt] Quickie HTML named anchors

Charilaos Skiadas skiadas at hanover.edu
Wed Jul 11 18:28:03 UTC 2007


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

Two suggestions:
1) Ctrl-shift-A is the subversion shortcut, I would opt for something  
else.
2) I always get confused with the anchors terminology, so I will be  
vague here and hope it will make sense, but you might want to make  
one of the two commands so that it scans the document for appropriate  
anchors and offers a pop-up list for you to choose from, kind of like  
the label completion command works in LaTeX. I probably have a  
different workflow than you though, but anyway just my $0.02.

> Brett

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College







More information about the textmate mailing list