Join David D. Levine for an in-depth discussion in this video Moving the cursor, part of Learning vi.
…Now I'm going to show you how to move your cursor around using vi.…In command mode, we make use of the characters H, J, K, and L.…These four keys are almost right under your right hand if you…have your fingers on the home row.…They're interpreted as follows.…k goes up by one line.…j goes down by one line.…h goes to the left by one character.…l goes to the right by one character.…These keys have these meanings because on the ADM-3A terminal on which vi was…original written, those keys were labeled with arrows indicating that motion.…
And this same HJKL syntax from moving the cursor around is found in…a lot of other programs from that era.…So let's just demonstrate those.…We'll edit our Duke of York file again.…And now I can show you how we can go down with j, j, j, j.…To the right with l, l, l, l.…Up with k, k, k, k.…And to the left with h, h, h, h.…In addition to h, l, k and j, you have several other alternatives for…moving by one line or one character.…
You can use the arrow keys on your keyboard.…Now, depending on your keyboard, your terminal emulator, your operating system,…
AuthorDavid D. Levine
- Entering and leaving vi
- Understanding the Command, Insert, and Colon modes
- Moving around in files
- Editing text
- Moving content with delete, yank, and put
- Searching with regular expressions
- Customizing vi
- Filtering text through shell commands
Skill Level Beginner
1. Exploring vi
What is vi?2m 26s
2. Getting Started with vi
3. Moving Around within a File
4. Basic Text Editing
5. Undo, Repeat, Yank, and Put
6. Search and Replace
7. Advanced Editing Features
- 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.