Reputation: 1575
In Vim, is there a key moving cursor to the beginning of the next line?
j
moves the cursor to the corresponding position of the current position in the next line. I'm looking for a single key that could move the cursor to position 0 irrespective of the cursor position in the current line.
Upvotes: 33
Views: 31019
Reputation: 172520
The +
motion moves to the first non-blank character in the next ([count]
) line. That fulfills your requirement if there's no indent. With indent, you can use +0
or j0
.
Upvotes: 56
Reputation: 2058
You can move to the beginning of a line by pressing +
That just moves to the first non-blank character at the beginning of the line, which is fine if there is no indentation. If you want to go to the first character in the line regardless of white space, you can do j0
If you need any more help with movement keys, this is a good resource: http://vim.wikia.com/wiki/Moving_around
Upvotes: 5