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

Python Basic Object-Oriented Python Welcome to OOP Class Attributes

How did she comment out lines of code quickly like that?

.

1 Answer

Hi Jessica!

On a Mac and with most code editors,

Cmd + /

comments/uncomments highlighted code.

And

Cmd + ]

indents highlighted code

And

Cmd + [

Removes each indent

Keyboard shortcuts for Mac VSCode:

https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf?WT.mc_id=code-online-jopapa

Keyboard shortcuts for Windows VSCode:

https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf

Keep in mind that many code editors - VSCode, Atom, Treehouse Workspaces, Sublime, Brackets, etc...., react the same to certain (not all, there are some deviations particular to each environment!?!) keyboard shortcuts - they tend to try to adopt the same popular conventions, whenever possible.

Also, the code editors, because of the extension the file is saved with, will automatically use the comments appropriate for that language!?! (Coolio...!?!)

I hope that helps.

Stay safe and happy coding!