here's my attempt. just double click the bundle to install. should
convert all characters to lowercase then add underscores instead of
spaces. I don't know why it's inserting the newline though. if someone
knows how to use sed they could make a better command. <br>
<br>
hope this helps!<br>
<br>
-Nick<br><br><div class="gmail_quote">On Wed, Nov 19, 2008 at 10:43 AM, Hans-Jörg Bibiko <span dir="ltr"><<a href="mailto:bibiko@eva.mpg.de">bibiko@eva.mpg.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
On 19.11.2008, at 19:25, Michael Reiner wrote:<br>
<br>
> Can anyone help with a command that would convert the case of selected<br>
> text as well as replaced spaces with underscores?<br>
><br>
> So, for instance:<br>
><br>
> This is a Title  ->  this_is_a_title<br>
><br>
> As a complete beginner in TextMate, I'm not sure how to create a<br>
> command to do this.<br>
<br>
</div>There're many ways. Maybe the simplest - record a macro:<br>
<br>
- type 'This is a Title' and select it<br>
<br>
- Bundles > Macro > Start Recording<br>
<br>
- Text > Convert > to Lowercase<br>
<br>
- Edit > Find > Find [APPLE+F]<br>
<br>
– Find: ' ' (a space)<br>
   Replace: '_'<br>
<br>
   Hold down OPTION key and execute 'In Selection'<br>
<br>
- Bundles > Macro > Stop Recording<br>
<br>
- Bundles > Macro > Save Last Recording<br>
<br>
That's it. You can maybe assign a shortcut to the macro of course.<br>
<font color="#888888"><br>
<br>
<br>
--Hans<br>
</font><div><div></div><div class="Wj3C7c"><br>
<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>
</div></div></blockquote></div><br>