开发者

In Netbeans IDE, desired behavior is when i press b then space, it creates two curly brackets with cursor in middle

开发者 https://www.devze.com 2022-12-12 09:28 出处:网络
when I press b-space for code block it does:开发者_Python百科 { (cursor here) } How can I go about accomplishing this? Thanks.Go to Tools/Options/Editor/Code Templates. Create a new template for th

when I press b-space for code block it does:

开发者_Python百科
{
(cursor here)
}

How can I go about accomplishing this? Thanks.


Go to Tools/Options/Editor/Code Templates. Create a new template for the letter b (New, type b, Ok), then type the following into Expanded Text:

{
    ${cursor}
}

Finally, set Expand Template on to Space.

By the way, you can get the same behavior by pressing {, and hitting an enter.

0

精彩评论

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