Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools

quick command (Windows)

What is the command to indent multiple lines of code on a windows machine? you highlight all the lines, and i thought it was tab, but guess not.

6 Answers

I don't think Notepad comes with any features like that and I'm not sure that auto-indent is a standard keyboard facility. In other text editors this feature is available, such as Sublime, Notepad++ and most IDEs. Google doesn't reveal a solution to your problem either. I'd suggest trying out different text editors - there's lots out there. I like Sublime Text for no other reason than it was the first one I came across. That supports block indenting, like you're after and can comment out blocks of code too. It also knows how code should be indented so will assist you in getting it looking good.

Sorry I don't have the answer but I'm not sure there is one.

Steve.

Hi Matthew,

Have you tried highlighting the lines then using ctrl and the ] (closing square bracket) key?

Steve.

Sublime is free to trial on a permanent basis so it'll ask you to purchase a licence every x-number of file saves but you don't need to buy one. It's a good piece of kit.

nope doesn't work. Thanks though.

What are you using? Are you in Workspaces, in Notepad, in an IDE? Where are you trying to indent your text?

Steve.

my text editor on windows, notepad. didn't know it mattered lol

Nope, that answer was perfect. Thank you. Is sublime free?