views:

173

answers:

2

Lets say that i have this block of text

public function __construct() {
    parent::__construct();
}

and i want to insert a new line above parrent::construct at the same level. Like:

public function __construct() {
    // this is the new line. 
    parent::__construct();
}

how can i do this. I try'ed to do CTRL+Enter in command mode but that will move the { down also. I managed to do it by going with the cursor to beginning of parent and do CTRL+Enter. Isn't there a way to do it when the cursor is at the end of the first line ? or a shortcut to jump faster to parrent ?

thank you.

+1  A: 

Maybe you should enable auto indention? That might solve your problems.

In your .vimrc file:

:set autoindent
Lennart
sorry i forgot to mention i am using vim plugin for netbeans ... so not all the functionality of vim is available
solomongaby
+5  A: 

Try 'O' and 'o' in the normal mode.

Mykola Golubyev