Strange VB code formatting.

I'm having some problems with the code formatting with VB.  I've even gone so far as to uninstall and reinstall to try and reset to default values and start from scratch with no joy.  The attached gif's are screen shots from before and after code cleanup.  I'd like the cleanup to leave the code formatted like it is so that after I've been adding code for a little while and run cleanup it doesn't FUBAR everything.  Is there some setting in VS that might be conflicting with Resharper and the two are fighting or something?  It's beginning to look like the only way I can get the code to be reasonably formatted is turn off all automatic formatting and just do it manually by hand as I type.

It would be nice if Resharper had editable templates for code formatting so that we could real customizing instead of just ticking checkboxes that don't seem to actually do what they're supposed to do.



Attachment(s):
after code cleanup.gif
before code cleanup.gif
4 comments

some of the formatting relies on the code formatting options in the languages part of R# options (take a look at the line wrapping settings), but VB code formatting is generally weird and neglected by R# team since VB support was introduced (for exmple: i reported. in R# 4 EAP that they replace leading tabs by spaces in all End constructs. This is not fixed until today in the current EAP builds). They promised to improve code formatting in the upcoming R# 6, but i don't see any advance until now in the EAP builds.

Regards
Klaus

P.S.: Just checked the behavior in current EAP build. I get the same weird formatting like you. If i set the right margin to 255 in the "Line break and Wrapping" VB language options the result is better, but as my leading tabs in the "End " constructs are replaced by spaces the formatting remains weird.

0

I suppose the best bet then would be to disable the Resharper code formatting completely until the VB support is on par with C#.

0

Hello Bryan,

I'm afraid I wasn't able to reproduce this behavior with the latest build
of ReSharper 6. Could you please install the latest build from http://tinyurl.com/6jrespl
and check if this behavior is still reproducible? Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I'm having some problems with the code formatting with VB.  I've even
gone so far as to uninstall and reinstall to try and reset to default
values and start from scratch with no joy.  The attached gif's are
screen shots from before and after code cleanup.  I'd like the cleanup
to leave the code formatted like it is so that after I've been adding
code for a little while and run cleanup it doesn't FUBAR everything.
Is there some setting in VS that might be conflicting with Resharper
and the two are fighting or something?  It's beginning to look like
the only way I can get the code to be reasonably formatted is turn off
all automatic formatting and just do it manually by hand as I type.

It would be nice if Resharper had editable templates for code
formatting so that we could real customizing instead of just ticking
checkboxes that don't seem to actually do what they're supposed to do.

---
Original message URL:
http://devnet.jetbrains.net/message/5302561#5302561



0

Massive improvement with the Re# 6 nightly build.  Only problem I can see so far is that code cleanup fails to indent the methods in a class (VB) properly.  I'm attaching screen shots of what I mean.  The automatic code formatting as I type seems to work properly, however, if I run code cleanup, it fails to honor the indention of class methods.  In the attached screen shots, the two methods in this particular class are only indented 1 space from the namespace declaration, while the class is indented a whole tab from the namespace.

It looks like VB support is improved significantly in Re# 6.  I look forward to the final release.  Hopefully, by then I'll be in a position to purchase the upgrade.



Attachment(s):
after code cleanup.gif
before code cleanup.gif
0

Please sign in to leave a comment.