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

Wrong indent #86

Closed
david50407 opened this issue Mar 10, 2016 · 8 comments

Comments

Projects
None yet
4 participants
@david50407
Copy link

commented Mar 10, 2016

Before:
2016-03-10 16 49 03

After:
2016-03-10 16 49 26

It caused when there are multiple DOMs inside the {} block.

@ColinTheRobot

This comment has been minimized.

Copy link

commented Mar 17, 2016

+1

@mxw

This comment has been minimized.

Copy link
Owner

commented Mar 25, 2016

Could you post the code in a gist? Just for easy testing on my end.

Also—what do "before" and "after" mean here?

@david50407

This comment has been minimized.

Copy link
Author

commented Mar 25, 2016

@mxw here's the gist https://gist.github.com/david50407/81c041bde4596df1f86d

oh I mean before indent by vim (it might be the expect result of this case), and after indent by vim.

@leomelin

This comment has been minimized.

Copy link

commented Apr 4, 2016

+1
I'm having same kind of problems with files like this:
https://gist.github.com/leomelin/ce0825d22cd42d1d789e5e3fdbd57846

There is before and after selecting all with visual select and hitting indent. It seems to reset the indentation to level of last jsx tag or something like that

@mxw

This comment has been minimized.

Copy link
Owner

commented Apr 4, 2016

I'm unable to repro. Can you confirm that you've followed the instructions in the README?

@mxw

This comment has been minimized.

Copy link
Owner

commented Apr 4, 2016

Closing pending response; if you have the appropriate dependencies installed and still have the issue even after minimizing your ~/.vimrc (e.g., removing all other packages), please reopen!

@mxw mxw closed this Apr 4, 2016

@leomelin

This comment has been minimized.

Copy link

commented Apr 5, 2016

I did some fiddling around and found out that setting let g:xml_syntax_folding = 1 in vimrc breaks the indentation. So it's now fixed, it wasn't a problem with this plugin after all. Although it would be great to know why syntax folding setting affects indentation.

@mxw

This comment has been minimized.

Copy link
Owner

commented Apr 5, 2016

The README mentions that XML syntax folding doesn't work with vim-jsx—I don't know why it affects indentation, but vim-jsx doesn't support folding anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.