vim-erlang / vim-erlang-runtime

Erlang indentation and syntax for Vim
https://vim-erlang.github.io
101 stars 29 forks source link

Fix indentation when line starts with quote #6

Open hcs42 opened 11 years ago

hcs42 commented 11 years ago

When the first character of a line is an opening quote, the indentation is incorrect:

'my function'() ->
LineToIndent.

Another problem is that when hitting enter inside a string, the new line will be indented incorrectly.

For example if you type this:

documentation() ->
    "Documentation
This is the first line of a documentation.

and hit enter, the cursor (shown as a | below) will be placed in the same column as the quote:

documentation() ->
    "Documentation
This is the first line of a documentation.
    |

The correct behavior is to not modify the indentation calculated by Vim:

documentation() ->
    "Documentation
This is the first line of a documentation.
|
aerosol commented 10 years ago

:+1: