This tip shows you two keyboard shortcuts that enhance adding the newline that are useful when your cursor is not at the beginning or end of the line.
- [Instructor] Inserting a blank line in a code file…is probably second nature for you.…I'm not sure what technique you employ.…Here are some of the common techniques I've seen.…I want to add a blank line after line 14.…So I move my cursor with my mouse to the end of the line.…And then I press the Enter key.…That adds a new blank line on line 15,…and it moves the insertion point…to the beginning of that line.…Control + Z to undo.…Now I'll move my cursor to the beginning of the line…with the mouse and press the Enter key.…
Now I get a new blank line on line 14,…and all the rest of the code moves down.…Another technique I see developers use…for moving the cursor…to the beginning or the ending of the line,…instead of using the mouse, is to use the keyboard.…You can use the arrow key.…That moves one character at a time.…Or you can hold down the Control key.…Now when you tap the arrow keys,…you're moving one word at a time.…But you still need to have your cursor…at the end of the line to insert a blank line.…Let's say that I'm in the middle…
Skill Level Intermediate
Q: Why can't I earn a Certificate of Completion for this course?
A: We publish a new tutorial or tutorials for this course on a regular basis. We are unable to offer a Certificate of Completion because it is an ever-evolving course that is not designed to be completed. Check back often for new movies.
New This Week
Use the GitHub Extension1m 39s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.