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.

JavaScript jQuery Basics (2014) Creating a Simple Drawing Application Perform: Part 2

Branko Zivanovic
Branko Zivanovic
2,684 Points

This guy is selecting lines of code only with keyboard.How?

Title says everything.When I want to select few lines of code I do it by leftclicking and dragging down to select what I want to be selected, but this guy is doing all job with keyboard controls.How? Thanks

samiff
samiff
31,206 Points

Shift + Arrow Keys maybe? I do it the way you described as well, but I'm interested in learning more key commands to get around quicker. You should see some of the Linux wizards dash through text editors and terminals with a keyboard alone, it's crazy.

2 Answers

Try different combinations of holding shift, command and arrow keys. For example command + right arrow will take you to the end of the line you're on. Command + left arrow takes you to the beginning. Command + shift + right arrow will highlight from the cursor to the end of the line. Shift + up or shift + down will highlight the line above or below. Command + shift + down arrow will select everything from your cursor to the end of the file. Play around with it. Cheers

He is doing it with the shift + arrow keys. If you want to select a line of code starting left to right, you simple arrow key over to where you wish to start, hold down shift, and use the arrow keys accordingly! Don't forget to mark best answer if this helped!