Sublime Text 2: How to disable auto indentation on new lines after brackets?

1.2k views Asked by At

I try to work with Sublime Text 2.

In Javascript, whenever I type a bracket and press ENTER, an extra indentation is added like this ("|" symbolizes the cursor):

    if () {
        |

If I set "auto_indent" to false in Sublime Text 2 settings, whenever I type a bracket and press ENTER, the cursor moves to the beginning of the line, like this :

    if () {
|

I want the cursor moves at the same horizontal point as the bracket, like this:

    if () {
    |

Do you have an idea to help me please?

1

There are 1 answers

0
Void Main On

I'm not quite get the last example you gave use above, so I'll just gave you some information I know, hopefully, there will be something useful to you. According to official indentation documentation, there is a "indent_to_bracket" option, you may give it a shot.

And I know a sublime text plugin called SublimeBracketeer that seems does the heavy lifting for you. Maybe you can give it a shot.