6

By pressing l you can move to the next position in a line. Unless you are at the end of the current line, in which case you won't move at all.

Is there some simple way to automatically move to the next line, if you reached the end of the current line?

Note: I don't want to use this in my normal workflow, but rather this would make my script much more feasible, because I wouldn't always have to concern myself with that possibility.

EDIT: Actually <space> does that, but how are you supposed to execute space with the normal! command? It will just ignore it and complain that there are no arguments...

2
  • 1
    normal! 1 (1 followed by space?)
    – muru
    Jun 20, 2016 at 17:38
  • Yes! That's it. It's always simpler than you think, if you make that an answer, I'll accept it.
    – hgiesel
    Jun 20, 2016 at 17:40

1 Answer 1

7

Using <space> as the first command with normal is discussed in the help. From :h :normal:

{commands} cannot start with a space.  Put a count of
1 (one) before it, "1 " is one space.

So: :normal! 1 .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.