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 trialBranko Zivanovic
2,684 PointsThis 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
2 Answers
Bruce Blay
17,650 PointsTry 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
Gabriel E
8,916 PointsHe 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!
samiff
31,206 Pointssamiff
31,206 PointsShift + 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.