kchmck/vim-coffee-script — Issue #83: Asking for reindent all file messes with indentation
Author: carlosedp
Created: 2012-02-27 20:19:59+00:00
State: open

When I ask VIM to reindent the entire file using the command "gg=G", it messes with all indentation.

__Example:__

```
# Objects:
math =
root: Math.sqrt
square: square
cube: (x) -> x * square x

# Splats:
race = (winner, runners...) ->
print winner, runners

# Existence:
alert "I knew it!" if elvis?

# Splats:
race = (winner, runners...) ->
print winner, runners

# Splats:
race = (winner, runners...) ->
print winner, runners
```

__Reindents to:__

```
# Objects:
math =
root: Math.sqrt
square: square
cube: (x) -> x * square x

# Splats:
race = (winner, runners...) ->
print winner, runners

# Existence:
alert "I knew it!" if elvis?

# Splats:
race = (winner, runners...) ->
print winner, runners

# Splats:
race = (winner, runners...) ->
print winner, runners
```