[ANN] AutoNewline 0.3 plugin released

http://www.intellij.org/twiki/bin/view/Main/AutoNewline
Tested on 818 and 823. Not tested on 3.0.4.

AutoNewline enables electric behavior of the open brace, close brace, semi-colon characters. When these are pressed, the current line is reindented (if necessary) and then a newline is inserted and the caret is positioned on the next line at the indent level.

If you've used Emacs CCMode AutoNewline minor mode,
then you know what this does. (See CCMode documentation for additional background http://cc-mode.sourceforge.net/cc-mode.html#Auto-newline%20Insertion )

Basically, AutoNewline mode saves you from having to type the newlines at the end of the line. It also reindents the current line as go which can be helpful.
Also, the TAB key is overridden to reindent the current line. The keymappings are under Other->AutoNewline.

*Special Note: This is experimental code. I have been using it for the past few days, but there are likely many bugs in the behavior, esp. in other people's environment. Has only been tested on Aurora 818 and 823.
*

Please let me know if you try it out, esp. if you used to use CCMODE in Emacs before.

---
Making code formatting transparent to code editing.

Both HungryBackSpace and AutoNewline are intended to
reduce numbers of key presses needed to format the code.

The ideal situation would be that you never have to type
any whitespace characters except to distinguish tokens
and INTELLIJ IDEA would format the code as you type.
For example, I should be able to type:

and INTELLIJ would display the styled code
in realtime based on your code style settings:

The only space I had to type was the one between "int i".

See also related feature requests:
Feature Request # 12356 Hungry Backspace (from Emacs cc-mode)
http://www.intellij.net/tracker/idea/viewSCR?publicId=12356

Feature Request #12355- Auto-format of whitespace according to coding style
http://www.intellij.net/tracker/idea/viewSCR?publicId=12355

Feature Request # 12358 SmartKey semicolon ;
http://www.intellij.net/tracker/idea/viewSCR?publicId=12358

Tracker Request # 12357 SmartKey Brace opening { and closing brace }
http://www.intellij.net/tracker/idea/viewSCR?publicId=12357

Tracker Request # 12354 Handling of whitespace (from Emacs cc-mode)
http://www.intellij.net/tracker/idea/viewSCR?publicId=12354

Please vote for these requests if you like how HungryBackSpace and AutoNewline plugins worked, because I think they belong in the INTELLIJ editor core and not in a plugin. JetBrains could do a more thorough job than my implementation which has a couple kludges in it.

-Alex

0

Please sign in to leave a comment.