开发者

Go to nextline in Netbeans without using down arrow key or mouse

Imagine for example that you are writing a method inside a class:

public getFoo() {
    return $this->foo;
}

So after you end typing the return value, you have the cursor after the semicolon, and in order to continue writing after the end curly brace, you have to either move the hand away to use the down arrow key, or worse, to use the mouse.

Is there a more efficient way of doing this without having to move the right hand f开发者_StackOverflowrom its natural position?

It may seem a silly question, but I have to do this all the time so I was wondering if there is a better way to do it.


you can find the list of every available shortcut and also customize them for your needs at the top menu > Tools > Options > KeyMap. Look for "Insertion Point Down". Erm... Actually I would keep the defaults and use the down arrow after the semicolon just to move after the curly braces (semicolon is near arrows at my keyboard).

But I can suggest the following shortcuts for other situations: Ctrl + G (Go to line...), Ctrl + 7 (Navigator + Select Method if you want to go to some other method) and Ctrl + I if you want to search for something.

Just to be sure, do you know that Netbeans can generate your getter and setter methods for you? Alt+Insert, select from pop-up menu: http://netbeans.dzone.com/news/generate-constructor-getters-a.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜