[TxMt] Looking for the equivalents to some Emacs commands

Jonas Steverud jtvrud at bredband.net
Sun Aug 6 08:50:24 UTC 2006


Hello,
  I am contemplating to buy TextMate, it is by far the most competent  
and well designed editor I've seen for OS X - and I've been looking  
for a replacement for Emacs for the last couple of years* - but  
before really hitting the credit card I would like to find the answer  
to a few questions that I have not found in the documentation:

1. A very handy feature of Emacs is the just-one-space command; that  
is, all spaces and tabs around the point is reduced into one space.  
E.g. (the bar sign is the cursor); "x  |  x" becomes "x |x". Is there  
such a command within TextMate? If not, any suggestions for how to  
create one? I did an experiment, I created a new command and had it  
running perl with a regexp on the line. The problem is that I want to  
have it to be run around the current position, not all spaces on the  
line. Is there a way of sending the current cursor position to the  
command? I.e. "x   x     |   x" shall become "x   x |x", not "x x |x"  
or something like it.

2. Indent region: Something that I frequently uses is the fill- 
paragraph and friends of Emacs; TextMate's Reformat (^Q) isn't as  
advanced and is not language/bundle aware. i was thinking of porting  
the Lisp code into e.g. perl and create a new command for it, but  
before I spend any time on it I would like to know if there is  
something similar already implemented that I've missed? (I usully  
write HTML, Shell Scripts and Perl in TextMate but will migrate my  
LaTeX files and other programming languages to TextMate as time passes.)

3. When I write HTML I would like to have e.g. lists looks like this:
<ol>
  <li>AAA Lorem ipsum lorem ipsum lorem ipsum lorem ipsum
        BBB lorem ipsum lorem ipsum lorem ipsum lorem ipsum
        CCC lorem ipsum lorem ipsum lorem ipsum</li>
</ol>
But, I do not want it to add whitespace before the BBB and CCC, I  
would like it to wrap lines visually but the file should still look  
like this:

<ol>
  <li>AAA Lorem ipsum lorem ipsum lorem ipsum lorem ipsum BBB lorem  
ipsum lorem ipsum lorem ipsum lorem ipsum CCC lorem ipsum lorem ipsum  
lorem ipsum</li>

</ol>

Is this even possible? The visual presentation and the physical file  
would then differ and I don't think that makes sense for a /text/  
editor. (This is not available in Emacs AFAIK but it is something  
that I miss.)

Thank you.

/Jonas
-----
*) I'm fed up with the lack of proper Unicode support, no native Aqua  
build that isn't a hack and the reliance on X11 where cut-and-paste  
between X11 and any other OS X application s*cks. Don't get me wrong,  
I lived inside Emacs for over ten years, I not only read  
alt.religion.emacs - I also posted in it! When I say that TextMate is  
a competent editor, then it is far from an exaggeration. But I don't  
say that it is *the* editor. Not quite yet. :-)



More information about the textmate mailing list