mtoader/google-go-lang-idea-plugin — Issue #69: Automatic indentation problem
Author: dpx-infinity
Created: 2012-01-11 20:04:28+00:00
State: open

I have the following problem with indentation. When I start the block of code:

```go
if a == 0 {|}
```

and press Enter, I have the cursor positioned like this:

```go
if a == 0 {
| // A
}
```

but this is incorrect; correct placement should be

```go
if a == 0 {
| // B
}
```

since this is how java and other languages modes work. This problem is very annoying since I have to type Space four times every time I want to create new code block.

Another indentation problem I feel is connected to this: 'Emacs tab' command doesn't work properly, giving no effect. Emacs tab is a command which s iusually set to Tab key and it does not simply insert Tab character, but indents current line correctly instead. In this case it should transform A position to B position, but it doesn't.

I'm using IntelliJ IDEA 11.0.1 build 11.167.