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


sidni ahmed
sidni ahmed
3,329 Points

indentations shortcuts PEP8

in this video: https://teamtreehouse.com/library/write-better-python/cleaner-code/pep-8

i can see kenneth using some short cut on his keyboard like shift or tab to sort his indentation out. What is it that he's using? I've been trying to do it but it not working. I delete the spaces one by one with the delete key. It takes a while

2 Answers

Chris Freeman
Chris Freeman
Treehouse Moderator 68,423 Points

In workspaces, there are shortcut keys for indent (Ctrl-]) and unindent (Ctrl-[). It operates on current line if no highlighting. Highlight multiple lines to move lines as a group.

Josh Keenan
Josh Keenan
19,652 Points

Tab, tab is the key he's using. Same for most languages/environments