[txmt-dev] Re: Extending LaTeX Bundle with custom google web scrape

Allan Odgaard mailinglist at textmate.org
Sat Apr 27 06:40:51 UTC 2013


On Apr 26, 2013, at 3:46, Joshua Dunham <joshua.dunham at gmail.com> wrote:

>     My first stumbling block is that when I try and execute the
> Hyperlink Helper for any word / macro it returns a "(this language is
> not supported, see … for more info)" error message.

The command reads a TM_LINK_FORMAT variable from the environment which should be an ERb template that has 3 variables:

 input: The search string.
 url:   The URL found for this search string.
 title: The URLs title (optional).

We set the TM_LINK_FORMAT variable for different scopes corresponding to the syntax of the lanugage, for example for text.html we set it to:

    <a href="<%= e_sn url %>"<%= " title=\"\${1:#{e_sn title}}\"" if defined? title %>><%= e_sn input %></a>

You can find most of the templates in Hyperlink Helper → Settings.

All that said, it sounds like your desired command cannot be done simply by providing the proper template for LaTeX.



More information about the textmate-dev mailing list