Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Forms Choosing Options Select Menus

Shea Lewis
Shea Lewis
6,702 Points

How do I indent a group of selections, instead of indenting each selector individually?

In my workspace it sometimes occurs that I need to indent multiple lines of text. I attempted to do this by highlighting the lines that I needed to indent and then pressing tab. This did not work and erased my code.

3 Answers

Kamil Fedorow
Kamil Fedorow
15,977 Points

Hi, use CTRL + ] to move text right and CTRL + [ to move it left. It works also in Sublime Text which I highly recommend to use :)

Shea Lewis
Shea Lewis
6,702 Points

It works! Thank you so much.

Sam Fortune
Sam Fortune
2,990 Points

Also in workspace you can just highlight and hit tab!

Similarly, you can hit Shift+Tab with your code chunk highlighted to un-indent it.

CJ Williams
CJ Williams
34,372 Points

to select mutiple chunks of code at once hold CTRL+ALT(win) or CMD+CTRL(mac) while highlighting desired selections, then CTRL+[ or CTRL+] to move.

You can save yourself quite a bit of time this way.