I am somewhat clumsy in my vi knowledge. I know how to generally move around in command mode, specifically, jumping to lines, etc. But what is the command to jump to the end of the line that I am currently on?
Just the $ key. You can use 'A' to move to the end of the line and switch to editing mode.
Or there's the obvious answer: use the 'End' key to go to the end of the line.
The advantage of the 'End' key is it works in both normal and insert modes.
'$' works in normal/command mode only but it also works in the classic vi editor (good to know when vim is not available).
As lots of people have said:
- $ - gets you to the end of the line
but also:
- ^ - gets you to the first non-whitespace character in the line, and
- 0 (zero) - gets you to the beginning of the line incl. whitespace
If your current line wraps around the visible screen onto the next line, you can use g$ to get to the end of the screen line.
Possibly unrelated, but if you want to start a new line after the current line, you can use o anywhere in the line.
'$' jumps to the end of the line and selects the last non-whitespace character 'A' jumps to the last whitespace character
- $ moves to the last character on the line.
- g _ goes to the last non-whitespace character.