[ANN] HungryBackSpace-0.9 released
http://www.intellij.org/twiki/bin/view/Main/HungryBackSpace
Tested on 818. Should work on 3.0.4, but I haven't tested 0.9 on it. Let me know if it doesn't work.
Note: This release feels very solid to me (knock on wood) and the behavior is close to perfected. With the "Stop At Indent" feature, its behaves better than Emacs CCMode auto-hungry-delete, IMO.
I don't see any bugs or areas for improvement, * other than JetBrains should make this the default for BackSpace! * Whitespace is needed to format the code nicely, but it should be as transparent as possible to our edits.
Bug fix: The BackSpace would stop at the wrong indent level when it was on the line after an opening block, e.g. hitting backspace here:
would produce:
Bug fix: If you turned BackSpace Stop At Indent off, then BackSpace did nothing. Ooops!
RFE: If there are multiple blanks lines above the caret, then all the lines will be eaten except for the last one, and the caret will be positioned at the indent column. (This is how it was supposed to work before, but previously it was stopping at indent column of the last line.)
Pressing BackSpace here:
Will now produce:
请先登录再写评论。
RFE : Add option to not do hungry backspace in comments.
I use hungry backspace by default in code, but don't find it useful in
comments.
Alex wrote:
>
>
>
>
>
>
Well, I think this is a useful pluggin and you have done a great job on it, except that I don't use it.
I hope that JetBrains does integrate this into IDEA, except that it be Optional and Assignable through the key mapping.
I would really love to use this, but just not as the primary function for my backspace key.
Nathan wrote:
========================================================
RFE : Add option to not do hungry backspace in comments.
I use hungry backspace by default in code, but don't find it useful in
comments.
========================================================
OK, I can add an option to turn it on/off in comments/string literals. It might be awhile before I can get to it, though.
I probably need to do what Timur does for his Reformat plugin by adding the options in other.xml rather than cluttering up the menu like I did for 'BackSpace Stop at Indent'
These options are of the type where someone will set them once and then never touch them again.
-Alex
Guest wrote:
========================================================
Well, I think this is a useful pluggin and you have done a great job on it, except that I don't use it.
I hope that JetBrains does integrate this into IDEA, except that it be Optional and Assignable through the key mapping.
I would really love to use this, but just not as the primary function for my backspace key.
========================================================
Heh, now I'm starting to understand what JetBrains must feel like when they come out with a new feature (e.g. UI Designer), and they get deluged by bugs, rfes, etc "It's a nice feature, but I don't use it. Change it. Take it out." Ha ha. At least JetBrains is getting paid to listen to us!
If JetBrains adds a Smart BackSpace feature I would expect it to be similar to their other Editor->SmartKeys settings. Those SmartKeys are not assignable in the keymap.
If you actually want to think about when to use hungry versus non-hungry backspace, why don't you just press CTRL+BackSpace? It will give you something similar.
-Alex
well, it was not meant as negative critism, just honest input. When you design systems, you have to be open to them.
Actually, I would like to use Ctrl Backspace, but use that for the hungry backspace. That way, the regular backspace would work exactly as it does in ever other application that I use.
Making it available through key mapping, would not only make it available for everyone else, but it would make it even more customizable, so that each user would be able to use it in the way that best fits their individual situation, style, environment, etc.
Anyway, as I said, it was not meant as an attack, insult, or anything stupid like that.
No offense taken.
"Well, I think this is a useful pluggin and you have done a great job on it, except that I don't use it."
You really cracked me up when I read your first sentence.
-Alex
====================================================
Actually, I would like to use Ctrl Backspace, but use that for the hungry backspace. That way, the regular backspace would work exactly as it does in ever other application that I use.
====================================================
I think this is where we disagree. I don't think editing in IntelliJ should be the same as editing in MSWord, or whatever..
The only purpose of whitespace is to format the code to make it readable. If I need to BACKSPACE over some whitespace, logically I think of it as a single unit of whitespace. I don't care what it is composed of (spaces, tabs, newlines, etc.) I can't think of why I would need to remove only some of the whitespace, so I don't need separate BACKSPACE and CTRL+BACKSPACE keys.
The exception might be within String literals and Comments. Comments because you are responsible for adding the whitespace to format it not IntelliJ. String literals because that could be anything. Although for my own personal use, I would always have HungryBackSpace on even in comments and strings because I think net-net I still save more keystrokes with it on.
-Alex
It is not only about saving keystrokes.
I already have enough problems because of Ctrl-D, which I find myself instinctively trying to use in other editors, and PF3(which is find next in many applications, but is Exit in ISPF Edit(they use PF5 for find next).
The problem is, not everyone does everything the same way, nor thinks in the same way, no matter how hard MS, Sun, or anyone else tries to make us.