Dreamweaver Custom Code Hints?

larry98765

Registered
Hi All,

I know I can create keyboard shortcuts for snippets, etc. but is it possible to create custom code hints? For instance, I have some custom ASP tags I created (i.e. <%=customTagStart%>content<%=customTagEnd%> ) and I'd like to be able to start typing those tags in code view, and have Dreamweaver suggest (and complete if I choose) just as it would for built-in HTML tags.

Any ideas?

Thanks much.
 
I wondered about this once too so I looked it up a bit....you could use the library palette in MX/2004.....not too sure if you can bind it to a shortcut key but you can drag and drop from the library to code or design view...

To create a library item based on a selection:
-----------------------------------------------------------------------------
In the Document window, select a portion of a document to save as a library item.

Do one of the following:
Drag the selection into the Library category of the Assets pane (Window > Assets).

Click the New Library Item button at the bottom of the Library category of the Assets panel (Window > Assets).

Select Modify > Library > Add Object to Library.



Type a name for the new library item, then press Enter (Windows) or Return (Macintosh).

Dreamweaver saves each library item as a separate file (with the file extension .lbi) in the Library folder of the site's local root folder.

Inserting a library item in a document

When you add a library item to a page, the actual content is inserted in the document along with a reference to the library item.


To insert a library item in a document:
-----------------------------------------------------------------------
Place the insertion point in the Document window.

In the Assets panel (Window > Assets), select the Library category on the left side of the panel.

Do one of the following:
Drag a library item from the Assets panel to the Document window.

Tip: To insert the contents of a library item without including a reference to the item in the document, press Control (Windows) or Option (Macintosh) while dragging an item out of the Assets panel. If you insert an item this way, you can edit the item in the document, but the document won't update when you update pages that use that library item.


Select a library item, then click the Insert button at the bottom of the panel.
 
andehlu,

Thanks for your reply, but I really am looking for a way to create custom code hints, not library items.

Larry
 
heh ok sorry man...i misunderstood...but i was thinking, wouldnt library items be just as easy? I think a the custom hints would be a pseudo hack on the app.
 
Hi Andehlu,

Again, thanks for your reply. Maybe I should explain further what I'm doing --

When I'm typing in code I'd like to be able to start typing my custom tag and have Dreamweaver auto-complete it. Taking my hands from the keyboard to drag and drop defeats the purpose, and creating keyboard shortcuts doesn't work, because I plan to create a lot of custom tags.

Also library items are more for bigger chunks of code that can be updated en masse. I'm looking to just make hand-coding quicker.

I just found MX's Tag Library Editor, which SHOULD do the trick, except that it won't allow me to enter the % part of the tag -- it only allows letters, numbers, underscores, etc.

So you may be right that a hack is in order.
 
Back
Top