[SVN] TM_CURRENT_WORD not working properly with }

Charilaos Skiadas skiadas at math.uchicago.edu
Tue May 17 22:21:19 UTC 2005


On May 17, 2005, at 2:56 PM, Allan Odgaard wrote:

>> how can I test for whether my cursor is between empty curly braces?
>
> prev_ch=${TM_CURRENT_LINE:$TM_COLUMN_NUMBER-2:1}
> if [[ $prev_ch == '{' ]]; then
>     echo -n in bracket
> fi

Cool! Works like a charm. I guess I should have thought of checking the 
cursor location instead of the current word. :-)

Thanks,
Haris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 443 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate-dev/attachments/20050517/9957d8ef/attachment.bin>


More information about the textmate-dev mailing list