A feature that I’m really happy about it got introduced in Visual Studio 17.7 is copy and trim identation. One of the things that I do a lot as writer of blog posts, is copy/pasting code snippets from Visual Studio.
Before Visual Studio 17.7 when I paste a code snippet in for example Github gists the indentation levels are inconsistent So far I always started to correct the indentation levels manually but of course that is a lot of work.
Last year a Copy Nice extension was created to help solve this problem. But starting from Visual Studio 17.7 the built-in copy/paste got a lot smarter and this extension is now no longer necessary.
This is what originally happened when you do a copy. Here is the selection:
And here is the pasted result:
You see that the indentation is wrong and should be fixed.
If you try to do the same thing in Visual Studio 17.7, this is how the pasted code looks like:
I love it!