[txmt-dev] Question about PlugIns

Caleb Land caleb.land at gmail.com
Sat Jan 26 20:43:18 UTC 2013


Hi guys,

I'm trying to update the Emmit HTML plugin (https://github.com/emmetio/emmet-objc) to work in TM2.

It's pretty straightforward, it uses:

[NSApp targetForAction:@selector(insertSnippetWithOptions:)]

to get the OakTextView that is active.

The problem comes when it needs to access the 'environmentVariables' method of the OakTextView… there isn't one.

It uses the result to access:

TM_LINE_NUMBER  
TM_LINE_INDEX

My question is how should I get those from the plugin?

I see that I need to somehow call editor_t::variables, but I don't know how I could call it from the OakTextView without including the TextMate headers and accessing the "editor" member of the OakTextView.

Is there something I'm missing?

--  
Caleb Land
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate-dev/attachments/20130126/31f0d555/attachment.html>


More information about the textmate-dev mailing list