[TxMt] Regex to indent new lines between tags

Allan Odgaard throw-away-1 at macromates.com
Sun Jun 10 08:57:48 UTC 2007


On 9. Jun 2007, at 20:26, Mike Stickel wrote:

> For a project I'm working one I'm trying to figure out a way to tab  
> indent new lines of code between certain tags (mainly <head> and  
> <body>). Unfortunately I'm not as good at regular expressions as I  
> thought I was and can't figure it out.
>
> Anyone out there able to lend a hand?

Exactly when do you want what to happen?

If you have the following:

     <head>
     bla bla
     </head>

     <body>
     bla bla
     </body>

Then select it and use Text → Indent Selection (⌥⌘[]) then you  
get:

     <head>
         bla bla
     </head>

     <body>
         bla bla
     </body>

Is this the functionality you are after?






More information about the textmate mailing list