[TxMt] Re: non-blank-lines block as scope to eval

Allan Odgaard mailinglist at textmate.org
Mon Dec 1 10:23:10 UTC 2008

On 30 Nov 2008, at 21:17, Alexy Khrabrov wrote:

> [...]
> Now I chose "Line" in Input: [Selected Text] or [Line], but what I'd
> really like to choose is "Non-blank line segment around the cursor".
> I'm not sure what can I do with the [Scope] there, as scopeName
> defines the whole 'source.ocaml', AFAICU.

Scope selector would be selecting scopes based on the grammar, so if  
the grammar doesn’t give a unique/selectable scope to the function,  
this option is not useful.

> So, is there a way to achieve "select Non-blank line segment around
> the cursor, then send THAT to ocaml using an Eval snippet or  
> similarly"?

You might be able to pull it off using a macro, alternatively you  
could take entire source as input and look at TM_LINE to figure out  
(in the command’s code) what to actually execute (similiar to Ruby’s  
Run Focused Unit Test).

More information about the textmate mailing list