how to move cursor directly to the next new line?

7

1

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 ?

it_is_a_literature

Posted 2013-12-21T08:19:25.777

Reputation: 373

As pointed below, the question is unclear. If the question is "what's the fastest way to insert text at the end of a line while the cursor is at the beginning of it, then one way it's pressing shift+a in normal mode. – Immanuel Weihnachten – 2015-08-31T07:56:20.907

For what it's worth; (I notice from editing some of your previous questions also), commas come before the space. – Sirex – 2013-12-21T08:48:43.457

Answers

11

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.

Sirex

Posted 2013-12-21T08:19:25.777

Reputation: 10 321

7

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.

GregHNZ

Posted 2013-12-21T08:19:25.777

Reputation: 381

ah, yeah - if this is what's being asked by luofeiyu, hitting the 'end' key will also do it. – Sirex – 2013-12-21T08:50:22.213

0

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.

trailing slash

Posted 2013-12-21T08:19:25.777

Reputation: 126