[TxMt] Find-previous in TM2 macro

Max Weiss 30f0fn at gmail.com
Fri Jun 7 17:10:00 UTC 2013


Dear Textmaters,

I'm a very unsophisticated Textmate-lover who upgraded recently to Textmate 2.  

In Textmate 1.X I'd made some macros to jump to the beginning or end of a
sentence while editing text.  Basically, they just search backward or 
forward for a gerrymandered regex and move the cursor to the position 
of the first match.  

Now, when I imported these macros into Textmate 2, the jump-forward macro 
works fine.  But, the jump-backward macro behaves like the jump-forward 
macro.  I.e., when I run it, it seems to do "find next" rather than the 
requested "find previous".  

The code is pasted below.

If anybody could suggest an explanation or remedy I'd appreciate it!  

Thanks,

Max






(
	{	argument = {
			action = 'findPrevious';
			findInProjectRegularExpression = :false;
			findString = '\S';
			ignoreCase = :true;
			regularExpression = :true;
			replaceAllScope = 'selection';
			replaceString = '';
			wrapAround = :false;
		};
		command = 'findWithOptions:';
	},
	{	argument = {
			action = 'findPrevious';
			findInProjectRegularExpression = :false;
			findString = '((\?|\.|\!)(\''|\"|\)|\}|\])*(\n|\t|\r|\s)+)|((\r|\n)\s)';
			ignoreCase = :true;
			regularExpression = :true;
			replaceAllScope = 'selection';
			replaceString = '';
			wrapAround = :true;
		};
		command = 'findWithOptions:';
	},
	{	command = 'moveRight:'; },
)




More information about the textmate mailing list