Thanks. That worked. I guess opening up the FIND window broke everything......<br><br><div class="gmail_quote">On Thu, Jul 17, 2008 at 1:43 PM, Joseph Pecoraro <<a href="mailto:joepeck02@gmail.com">joepeck02@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div>Ritesh,</div><div><br></div><div>Try these steps:</div><div><div>============</div>
<div> </div><div>1) Put cursor in middle of a word</div><div>2) Start recording macro</div><div>3) Ctrl+W (Selects the entire word, this is easier then the two step ctrl+left, ctrl+right, and works if the cursor is right before the first char of the word!)</div>
<div>4) Command+E (Puts the word into the 'Find' part of the Find dialog without opening the dialog)</div><div>5) Command+G (Searches for the next occurance of the 'Find' word in the Find dialog without opening the dialog)</div>
<div>6) Stop recording macro</div><div><br></div><div>The reason your version wasn't working before was that when you opened the find dialog and ran search, the macro was only recording the single "real action" that was taking place... searching for whatever word was in the "Find" buffer. It then records that in the macro as "perform a search with the given hardcoded word" In the macro above, using Command+E (also known as Apple+E) is an action to put the current word into the "Find" buffer. That action is recorded by the macro. Same with the Command+G action later.</div>
<div><br></div><div>I know that I didn't use the correct terminology, maybe someone can explain it a little better, but that is my reasoning of why your macro was not working.</div><div><br></div><div>Cheers,</div><div>
Joseph Pecoraro</div><div><a href="http://blog.bogojoker.com" target="_blank">http://blog.bogojoker.com</a></div></div><div><br></div><br><div><div><div></div><div class="Wj3C7c"><div>On Jul 17, 2008, at 2: 23PM, Ritesh Nadhani wrote:</div>
<br></div></div><blockquote type="cite"><div><div></div><div class="Wj3C7c">Hello All<div><br></div><div>Been using TextMate for 2 weeks now and love it.</div><div><br></div><div>I am trying to create a macro to search a word under the cursor when I press Ctrl+. These are the steps I follows: <a href="http://pastebin.com/m4418e1bd" target="_blank">http://pastebin.com/m4418e1bd</a> and this is what I get in macro editor: <a href="http://i36.tinypic.com/344cwm1.png" target="_blank">http://i36.tinypic.com/344cwm1.png</a> . It seems to be working but when I press Ctrl+. next, it searches for the word that I used to record the macro and not the current word under the cursor. </div>
<div><br></div><div>What am I missing or doing wrong?<br clear="all"><br>-- <br>Ritesh<br><a href="http://www.riteshn.com" target="_blank">http://www.riteshn.com</a> </div> <br></div></div>_______________________________________________<br>
textmate mailing list<br><a href="mailto:textmate@lists.macromates.com" target="_blank">textmate@lists.macromates.com</a><br><a href="http://lists.macromates.com/listinfo/textmate" target="_blank">http://lists.macromates.com/listinfo/textmate</a><br>
</blockquote></div><br></div><br><br>
_______________________________________________<br>
textmate mailing list<br>
<a href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</a><br>
<a href="http://lists.macromates.com/listinfo/textmate" target="_blank">http://lists.macromates.com/listinfo/textmate</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Ritesh<br><a href="http://www.riteshn.com">http://www.riteshn.com</a>