Opening a new line after a line that ends in a symbol for a keyword character indents incorrectly #132

amarshall opened this Issue Mar 5, 2013 · 6 comments


None yet
2 participants

amarshall commented Mar 5, 2013

For example:

foo = :+
  # Next line incorrectly indents

Same thing happens with things you’d expect: -, *, /, % &, |, do, etc.

Using parenthesis or quotes has the correct effect:

foo = (:+)
# Next line indents correctly
foo = :"+"
# Next line indents correctly

AndrewRadev commented Mar 10, 2013

I've pushed a commit to master that should fix this. Could you check it out and let me know if it works?


amarshall commented Mar 10, 2013

Yup, appears to be fixed. Thanks!

For future reference, I believe 9d16028 (and possibly 6c8f3d8) is what fixed this?

@amarshall amarshall closed this Mar 10, 2013


AndrewRadev commented Mar 10, 2013

Yes, it was 9d16028, though it probably wouldn't have worked without 6c8f3d8.


AndrewRadev commented Mar 12, 2013

I've reverted 9d16028, since it seems like it causes a regression (issue #139). I'll see what I can do to get both cases working soonish.

@AndrewRadev AndrewRadev reopened this Mar 12, 2013


AndrewRadev commented Mar 17, 2013

I've pushed a new commit to master that should fix this issue without causing the regression. Could you please confirm again that it works?

Regarding the solution, seems like I simply shouldn't have added Symbol to the "string" patterns. This mostly makes sense (a symbol really isn't a string), but these ignore patterns are a bit convoluted. Provided I can muster the energy to do it, I may rewrite them a bit in the future.


amarshall commented Mar 17, 2013

Yup, appears to work again (as does #139), thanks!

@amarshall amarshall closed this Mar 17, 2013

jtmkrueger pushed a commit to jtmkrueger/vim-ruby that referenced this issue Nov 5, 2013

Fix continuation issue again
A spec was implemented for vim-ruby#139.

The issue this commit fixes is: vim-ruby#132.

By adding the `Symbol` group to the "string or syntax" pattern, some
continuations are fixed. It should not be added to the "string" pattern,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment