Move cursor to beginning of non-whitespace characters in a line in Vim

If I understand correctly - from :h ^:

^ To the first non-blank character of the line.
  |exclusive| motion.

(in contrast to 0, which gets you to the beginning, regardless of whitespace or not)


Instead of pressing ^ you can press _(underscore) to jump to the first non-whitespace character on the same line the cursor is on.

+ and - jump to the first non-whitespace character on the next / previous line.

(These commands only work in command mode, not in insert mode.)


Also possibly useful: + and - will move the cursor up or down, respectively, to the first non-blank character.

Tags:

Vim

Macvim

Gvim