Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect comma first style #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

88maomao
Copy link

@88maomao 88maomao commented Feb 5, 2018

Make following formatting style possible

-export([ respect/1
        , first/2
        , comma/3]).

Make following formatting style possible

-export([ respect/1
        , first/2
        , comma/3]).
@hcs42 hcs42 self-assigned this Feb 20, 2018
@hcs42
Copy link
Member

hcs42 commented Feb 21, 2018

If I have an Erlang file such as this one:

f() ->
    1
        , 2.

and try to indent the last line, it doesn't move.

If I source helper.vim and hit shift-F3, it shows the error:

Indenting line 3:     , 2.
  Line type = 'first comma'
Tokenizing starts from line 2
Tokenizing line 2:     1
  Tokens in the line:
    - ['1', 4, 4]
  Analyzing the following token: ['1', 4, 4]
    Misc token, stack unchanged = ['first_comma']
    Token processed. stored_vcol=-1
  Line analyzed. stored_vcol=-1
Tokenizing starts from line 1
Tokenizing line 1: f() ->
  Tokens in the line:
    - ['f', 0, 0]
    - ['(', 1, 1]
    - [')', 2, 2]
    - ['->', 4, 4]
  Analyzing the following token: ['->', 4, 4]
    Unexpected token ->, stack = ['first_comma'] -> return
ErlangCalcIndent returned: -1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants