Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA backspace and indention?

Here's two scenarios:

Eclipse (or perhaps even other programs?): If I indent, such as pressing tab or similar: Step 1: ( | is the caret )

public text(){
     |
}

Step 2: I press backspace:

 public text(){
 |
    }

See how one press of backspace moves back a whole indent since it's all empty space? Similarily, if I indent four times with TAB I'd press 4 backspaces, each moving one empty spaced indent.

Is this possible with IntelliJ because right now, I'm forced to spam the backspace key because it only moves back one step? As in, if I wanted to achieve the same result as in Step 2, I'd have to backspace like 4-5 times.

like image 557
optional Avatar asked Apr 14 '13 17:04

optional


2 Answers

Just in case someone else stumbles upon this in the future, this is now a standard option found at:

Preferences -> Editor -> General -> Smart Keys. Then under the Backspace section choose the Unindent option you like

like image 128
Keegan Lillo Avatar answered Oct 03 '22 04:10

Keegan Lillo


You may want to try this really handy plugin for intellij: hungry backspace It "eats" all the white spaces when you hit backspace! Something close to that but not as good would be typing ctrl + backspace.

like image 39
sakis kaliakoudas Avatar answered Oct 03 '22 03:10

sakis kaliakoudas