Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TextMate - auto add closing HTML tag

Tags:

textmate

Is there a way to make TextMate automatically add a closing HTML tag when I type the opening one? Something like what Notepad++ does under Windows/Linux, or MS Visual Studio.

I mean WITHOUT any shortcuts? So I just type "<body>" and it adds "</body>" and puts the cursor back in between. Without any "Ctrl + Shift + Option + Whatever" black magic.

Or a TextMate alternative maybe?

PS. Mac OS is just one of the many OS'es I work in, so I don't want to litter my brain with any shortcuts...

like image 368
Alex from Jitbit Avatar asked Nov 20 '11 09:11

Alex from Jitbit


1 Answers

No, you can't. The simplest thing you could do for closing tags is to type some opening tag with it's contents <div>Some text and then hit Command + Option + Dot to close the most recent unclosed tag. This involves a shortcut but it is easy to remember.

like image 77
Simon Perepelitsa Avatar answered Sep 19 '22 22:09

Simon Perepelitsa