[TxMt] Quick find and open last closed file

Charilaos Skiadas skiadas at hanover.edu
Wed Feb 7 01:00:21 UTC 2007


On Feb 6, 2007, at 6:54 PM, Juan wrote:
> 	I use a lot a command that I call "quickSearch"  that look for the  
> next text equal that the one that is selected.  It is very useful  
> since you can find quickly var declarations, etc.  only selecting  
> the word (you'll need only the keyboard!) and press, for exmple  
> Shift-Ctrl-Opt- ->  or Shift-Ctrl-Opt- <-  (arrow keys) for  
> quickSearchBackward.
> The only way I've found is building the macro:
>
> 	copySelectionToFindPboard:
> 	findForward:
>
> or the analogous for findPrevious:
>
> The problem is with this simple action I destroy the FindPboard and  
> this is an unnecessary, I think, colateral effect.

> Have s/o solve this not destroying the FindPboard?

In the bundle editor if you open a macro, there is a little checkbox  
called "Use local clipboard while executing macro". I think if you  
use that the pasteboard contents should not be affected. TM saves the  
pasteboard contents before executing macros/commands, and reinstates  
the pasteboard to its previous state when it's done.

This checkbox is in fact by default on, so theoretically your macro  
should not be destroying the findPboard. In fact I just tried it with  
such a macro and it worked just fine, the Pboard got unaffected.  
(Btw, you perhaps meant findNext: instead of findForward: ? I don't  
know how to produce findForward:, or if there is a difference between  
the two).

(I assume of course you created the macro by recording the keystrokes  
cmd-E and cmd-G).
> Another:
>
> I love to reread the last closed file in a time sorted (stacked)  
> way:  last closed file, first one to open.  This also allows me to  
> open several files (and close) them quickly.
>
> I used to use Ctrl-Opt-O for that process in AlphaX.  I can't find  
> the way for doing this with TM.  I think you should save in a file  
> the history of open files, or so... TM haven't memory variables, in  
> any way.  Alpha has an embedded interpreter inside it and then read  
> many many procs and variables at start and is easy to refer to them  
> and also has  open-hook and close-hook procs that make this stack  
> very easy.
>
> Any idea?

You might want to file a feature request if there isn't one yet:  
http://macromates.com/ticket/

> -- juan

Haris





More information about the textmate mailing list