[TxMt] drag commands

marios tmtxpstuff at consking.com
Fri Oct 13 21:46:05 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

marios wrote:
> I had forgotten to include the modifier key flags.
> Also to make this command  a little bit more useful, I added a Filetype
> variable
> that can be used, to add some extra text behind the title.
> It uses shift to distinguish between the base Urls, which when not set
> up will default to example.com.
>
> base="${TM_DROPPED_FILE/%.*/}"
> title="${base##*/}"
> FILETYPE=" Download"
> url2="www.example.com"
> url1="${TM_REMOTE_URL:-$url2}"
> url="${TM_LOCAL_URL:-$url2}"
> if [[ "$TM_MODIFIER_FLAGS" = *SHIFT* ]]
>         then BASE="$url"
>         else BASE="$url1"
> fi
> echo -n "<a href=\"http://\${1:$BASE}/file_download/\${2:file_id}\"
> title=\"\${3:$title}$FILETYPE\">\${4:$title}$FILETYPE</a>
> "
>
> I'm trying to figure out, how it can be done, so it does bulk inserting
> as well, in spite the fact, that they have tab stop variables, but still
> no go.
Tried some strange constructs with expressions, or let n=(n+1) with
sed, but that doesn't seem to give any valid syntax.
The reason, why I am so much after this, is that it would open new
roads not only for the drag commands,
but other commands as well.

regards, marios
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: This might change in the future
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFMAkd8tSzPOYuZvQRAhlnAKC3n606JNXqoyYlb0f8kguC/xnrOQCghLnz
W5wahPvexYFYTLUqBD/Yn7Y=
=bln1
-----END PGP SIGNATURE-----




More information about the textmate mailing list