[SVN] TM_CURRENT_WORD not working properly with }

Allan Odgaard allan at macromates.com
Tue May 17 19:56:38 UTC 2005


On May 17, 2005, at 21:36, Charilaos Skiadas wrote:

> In the following text:
> \citep[see][Section~5.1]{}, by defining
> If the cursor is between the two braces, I am getting "1]{}, by" as  
> the current word. Is this the right behavior? I was kind of  
> counting on the last character of the current word being "}".

Well, it should probably have been “]{}, ”.

> 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




More information about the textmate-dev mailing list