Posts tagged with: tab button

A HTML-Kit feature I never knew about!

While working on a site in HTML-Kit today I accidentally came across a feature that I really wish I knew about a long time ago.

I was happily coding away (oddly enough) in PHP and had highlighted a few lines of code that I wanted to move. Before I had the chance to move them I accidentally hit the tab button on the keyboard only to see all the highlighted lines get tabbed at once :eek:.

When I code in PHP I always indent the code like so:

if (isset($_POST['submit']))
{
	// do something
}
 else
{
	// do something else
}

I find it makes the code easier to read and easier to spot if I’m missing any closing brackets, etc.

Sometimes after I have written some code, I decide that I want to enclose it inside another statement or another loop. So I write the new statement or loop and then manually tab each line inside it so the code is formatted the way I like it. I’ve had to manually tab anywhere up to fifthy lines of code before. Not any more :D.

If only I had known about this feature a long time ago. It would have saved me a lot of time and frustration.