Yesterday (monday 2017-05-15) I experienced that my VS17 started making crazy indentations when I pressed return for a new line inside a block of code.
Example (json):
"Header": {
"Title": "Hello world!",
"Desc": "A test"
},
"List1": {
"Item1": "Value1",
"Item2": "value2"
}
Now, if I write "Item1": "value1", and then press enter, I expect the previous indentations to occur (as they did the week before last, before me going on vacation). This week however it looks like this after writing and pressing enter:
"List1": {
"Item1": "value1",
| <- represents text selector
}
Now I've checked all my indentation settings and they're just like before. I've tried changing them back and forth to different settings and nothing seems to changes this behaviour.
If I after this crazy indentation press "ctrl + k + d" to format indentations, they go back to the previous normal and expected indentations. To me, this means that the editor knows the first instance is the correct one and the second is incorretly formatted (according to current settings).
I've looked into a lot of indentation problems on different forums incl here and I've found nothing that is similar to this.
It could also just be a bug with the latest patch that was released during the weekend but I figured I might try my luck here and see if somebody else has this issue and has managed to solve it.
This also happens with CSS-files.
Thanks in advance for any help!
edit
if I press return so the weird indentation appears and then "ctrl + z", the indentations return to normal but the new line is still there