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!

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

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

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!