M HYPE SPLASH
// news

how to move cursor directly to the next new line?

By John Campbell

here is my article.

with a screen editor,you can scroll the
page,move the cursor,delete lines,insert

my cursor position is at the beginning of the second line (character 'p' of "page"):

I want to continue my edit, so i press the esc key to reenter command mode, and then press '$' to move to the end of this line.

I then press the 'enter' key, so that i may continue my edit... Is there a simpler way to do this ?

2

5 Answers

This question is quite hard to understand, but i think you're either asking for how can you create a new line in command mode (use 'o') or how can you move down a line in vim ('j').

If it's neither of these things you wish to know, please say.

The simplest way is probably hit ctrl-o then $.

ctrl-o puts you into command mode for one command only, so the $ puts you to the end of the line, then you're automatically back into insert mode, and can continue your edit - i.e. hit enter an you're on the next line.

1

Press ctrl + o, then $ sign. Now press Esc + i and finally hit enter and this will lead you to the next line.

Another way to move the cursor directly to the next line (albeit without creating a new line and specifically from insert mode) is ctrl-g j or ctrl-g ctrl-j. See :h ins-special-special for more doubly special maneuvers.

Press end key and then press shift+enter.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy