They both seem to move the cursor to the first non-blank character of the current line and I wonder what was the reason for duplicating this functionality
1 Answer
Hello and welcome to this site!
:help left-right-motions
is your friend here.
The difference is that _
accepts a [count]
before it, citing the manual:
_ <underscore> [count] - 1 lines downward, on the first non-blank
character linewise.
while:
^ To the first non-blank character of the line.
exclusive motion.
Obviously, _
by itself is equivalent to 1_
, so the outcome is 0 lines downward, on the first non-blank character linewise, which means the current line (just like ^
).
-
2