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

'gq' is inconsistent #1304

Closed
tko opened this issue Apr 21, 2015 · 3 comments
Closed

'gq' is inconsistent #1304

tko opened this issue Apr 21, 2015 · 3 comments

Comments

@tko
Copy link
Contributor

tko commented Apr 21, 2015

In vim gq{motion} reformats the lines {motion} moves over, it's handy to reformat function call when the list of arguments grows too long to fit the line. In vim, possibly due to language-specific plugins, that takes care of indentation as well so the next line is properly aligned with parenthesis and whatnot. In spacemacs it leaves the second line badly hanging which in some cases is syntax error, e.g.

call(one, two, three)

vim:

call(one, two,
     three)

spacemacs:

call(one, two,
three)

I noticed that while python and haskell files get badly reformatted the indentation is properly applied in javascript, ruby and .c files. Of the previous languages I only have python, haskell, and javascript layers loaded which makes the inconsistent behaviour seem rather strange.

@swaroopch
Copy link
Contributor

Perhaps this issue should be reported upstream to evil-mode? https://bitbucket.org/lyro/evil/wiki/Home

@syl20bnr
Copy link
Owner

Thank you for the report, as @swaroopch wrote.
@tko can you post a reference to the upstream issue here so we can track it ?

@TheBB
Copy link
Contributor

TheBB commented Jan 26, 2016

This appears to be a difference between fill-region and fill-paragraph. Note that fill-paragraph (M-q) behaves as expected, it just doesn't accept a region. Since this issue has been open for a while and no upstream report has happend, I will close it.

@TheBB TheBB closed this as completed Jan 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants