This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 244042 - keyboard shortcut: insert empty block at end of line
Summary: keyboard shortcut: insert empty block at end of line
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-24 08:22 UTC by catweasle
Modified: 2014-04-24 10:40 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description catweasle 2014-04-24 08:22:15 UTC
One of the shortcuts i use often in netbeans is CTRL+; (or CTRL+SHIFT+;).
But frequently i need to start a new block at the end of the line, rather than terminating it (e.g. I'm typing an if or for statement).
I'd *love* to see a CTRL+{ shortcut which would
1/ Put a { at the end of the line
2/ Put the cursor at a new empty line below it
3/ Put a line with a closing } on the following line
The shortcut would thus behave as typing: END { RETURN
Comment 1 Jiri Prox 2014-04-24 09:17:33 UTC
You can record macro and assign shortcut to it. 

The macro will look like : caret-end-line "{" insert-break
Comment 2 catweasle 2014-04-24 10:40:32 UTC
Thanks Jiri, I've just done that.
I think having this macro included in the default set of shortcuts would be helpful for others, but if you don't agree just close the enhancement request.
---
I assigned the shortcut to CTRL+( and it works.
I can not assign the shortcut to CTRL+{ because on my keyboard { has to be typed as ALTGR+ç, so the shortcut ends up CTRL+ALT+ç and netbeans does not accept the ç key (shows up as an empty caret in the shortcut)