Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

New Drag commands for inserting urls and hrefs into existing tags dep…

…ending on scope

git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/HTML.tmbundle@8609 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
commit eeef3ae648cf416101c290d9624035e1f41b3fba 1 parent 17227a2
subtlegradient authored
View
33 DragCommands/Insert Anchor href 2.tmDragCommand
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>command</key>
+ <string>title=`echo $TM_DROPPED_FILE | perl -pe 's/^(.*\/)?(.*?)(\..*)?$/$2/g'`
+echo -n "href=\"$TM_DROPPED_FILE\" title=\"\${1:$title}\" "</string>
+ <key>draggedFileExtensions</key>
+ <array>
+ <string>html</string>
+ <string>htm</string>
+ <string>rhtml</string>
+ <string>shtml</string>
+ <string>phtml</string>
+ <string>php</string>
+ <string>php3</string>
+ <string>php4</string>
+ <string>php5</string>
+ <string>cfm</string>
+ <string>cfml</string>
+ <string>dbm</string>
+ <string>dbml</string>
+ </array>
+ <key>name</key>
+ <string>Insert Anchor href</string>
+ <key>output</key>
+ <string>insertAsSnippet</string>
+ <key>scope</key>
+ <string>text.html meta.tag entity.other.attribute-name -string.quoted</string>
+ <key>uuid</key>
+ <string>6F71B1E5-81D0-4D94-A2C5-7688A3D3EDB3</string>
+</dict>
+</plist>
View
33 DragCommands/Insert Anchor href.tmDragCommand
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>command</key>
+ <string>title=`echo $TM_DROPPED_FILE | perl -pe 's/^(.*\/)?(.*?)(\..*)?$/$2/g'`
+echo -n " href=\"$TM_DROPPED_FILE\" title=\"\${1:$title}\""</string>
+ <key>draggedFileExtensions</key>
+ <array>
+ <string>html</string>
+ <string>htm</string>
+ <string>rhtml</string>
+ <string>shtml</string>
+ <string>phtml</string>
+ <string>php</string>
+ <string>php3</string>
+ <string>php4</string>
+ <string>php5</string>
+ <string>cfm</string>
+ <string>cfml</string>
+ <string>dbm</string>
+ <string>dbml</string>
+ </array>
+ <key>name</key>
+ <string>Insert Anchor href</string>
+ <key>output</key>
+ <string>insertAsSnippet</string>
+ <key>scope</key>
+ <string>text.html meta.tag -string.quoted -entity</string>
+ <key>uuid</key>
+ <string>BD4AEF38-638B-4C47-A762-4A0A6190F9C7</string>
+</dict>
+</plist>
View
33 DragCommands/Insert URL.tmDragCommand
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>command</key>
+ <string>title=`echo $TM_DROPPED_FILE | perl -pe 's/^(.*\/)?(.*?)(\..*)?$/$2/g'`
+echo -n "$TM_DROPPED_FILE\" title=\"\${1:$title}"</string>
+ <key>draggedFileExtensions</key>
+ <array>
+ <string>html</string>
+ <string>htm</string>
+ <string>rhtml</string>
+ <string>shtml</string>
+ <string>phtml</string>
+ <string>php</string>
+ <string>php3</string>
+ <string>php4</string>
+ <string>php5</string>
+ <string>cfm</string>
+ <string>cfml</string>
+ <string>dbm</string>
+ <string>dbml</string>
+ </array>
+ <key>name</key>
+ <string>Insert URL</string>
+ <key>output</key>
+ <string>insertAsSnippet</string>
+ <key>scope</key>
+ <string>text.html meta.tag string.quoted</string>
+ <key>uuid</key>
+ <string>30130739-4E58-4720-9B27-88C7EE168D83</string>
+</dict>
+</plist>
View
3  info.plist
@@ -197,6 +197,9 @@
<string>4400BCE9-20E3-426E-B1D7-2C0BCA53BCF8</string>
<string>9AFDEB2C-D9F0-423E-8211-EBB089F51F0C</string>
<string>B23D6E15-6B33-11D9-86C1-000D93589AF6</string>
+ <string>BD4AEF38-638B-4C47-A762-4A0A6190F9C7</string>
+ <string>6F71B1E5-81D0-4D94-A2C5-7688A3D3EDB3</string>
+ <string>30130739-4E58-4720-9B27-88C7EE168D83</string>
<string>C8B717C2-6B33-11D9-BB47-000D93589AF6</string>
<string>92F77050-74F9-4DF7-9A6E-2B42641849F7</string>
<string>CD6D2CC6-6B33-11D9-BDFD-000D93589AF6</string>
Please sign in to comment.
Something went wrong with that request. Please try again.