Vim tip 15: moving within current line
Here are some of the Normal mode commands for moving within the current line:
- 0 move to the beginning of the current line (i.e. column number 1)
- you can also use the Home key
- ^ move to the beginning of the first non-blank character of the current line (useful for indented lines)
- $ move to the end of the current line
- you can also use the End key
- 3$ move to the end of 2 lines below the current line
- g_ move to the last non-blank character of the current line
- 3| move to the third column character
- | is same as 0 or 1|
Video demo:
See also my Vim Reference Guide and curated list of resources for Vim.