2

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

loxs
  • 123
  • 2

1 Answers1

5

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 ^).

Daniele Santi
  • 196
  • 2
  • 4