mwarrenus / js2-mode

Automatically exported from code.google.com/p/js2-mode
0 stars 0 forks source link

Auto indent should match previous line if they're at the same level #82

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Type this:
var a = {
  foo: 1,
}
2. With the point at the end of the second line, type TAB then RET 

What is the expected output? What do you see instead?
Expected:
The new line's indentation should match the previous line:
var a = {
          foo: 1,
          <POINT>
}

Actual:
The new line is indented to the level the first line was at before pressing TAB:
var a = {
          foo: 1,
  <POINT>
}

What version of the product are you using? On what operating system?
20080521
Emacs.app 23.0.0 Mac OS X 10.5.3

Please provide any additional information below.

Original issue reported on code.google.com by rib...@gmail.com on 20 Jun 2008 at 4:08

GoogleCodeExporter commented 9 years ago
this has a big effect when editing old code (that was not written with 
js2-mode),
because js2-mode insists on its indentation style, every single added line 
needs to
be re-indented from js2's default.

Original comment by schuyle...@gmail.com on 6 Jul 2008 at 6:34