开发者

NetBeans curly braces auto-closing

In the last time I often initialize arrays in this form :

int[] test = new int[]{1,2,3};

Whe开发者_运维百科n I type '[', NetBeans immediately put the closing brace.

The question is - which is the macro to do the same job with curly braces ?


Select from menu Tools > Options, select Editor in toolbar, go for Code Completion tab. You will see that Insert Closing Brackets Automatically is already automatically checked by default.

There was a guy, who asked an analogical question a while ago. There was no helpful answer. I guess that means that we should look for that in future versions.


I looked for solution too, for NetBeans 8.5 check answer, https://stackoverflow.com/a/38338967/7162006, in same window is option: Completition Selectors For Java add: {, autocomplete by hiting enter in editor. (classically)


This macro work to me:

Shortcut: Shift + {

Macro code: "}" caret-backward

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜