KakCAT
February 11, 2017, 6:47pm
271
(from MonoGame Feature Wishlist - #169 by MrValentine )
oops, I thought this was the General Conversation Thread, not the Feature Wishlist. Otherwise I wouldn’t have made that comment to pollute the Feature Wishlist thread I suppose I better answer it here, as the issue is totally offtopic to Feature Wishlist.
As github issues speak louder than words…
opened 05:34PM - 04 May 15 UTC
Bug
help wanted
Area-IDE
IDE-Formatter
Ported from TFS WorkItem: **1160552**
---
**Repro Steps:**
This item was file… d by a customer. Please communicate and close the loop with your customer via the customer tab inside TFS.
---
Problem Description
---
Hi,
Entering a # character forces all preprocessor entries to be indented again, even when all formatting options have been disabled. It also displaces some "}"s
My setup is: automatical formatting fully disabled , tabs size=4, keep tabs, indenting=none
I'm supplying two images to ease the explanation.
- Put your code like in image 1. Please note that there's a tabulation before "static void myfunc ()", so #if COND1 is not at the beginning of the line.
- Put the cursor where the cursor is in the image 1
- Type #
- The #if COND1 is automatically indented, and the closing bracket is moved to the right (shown in image 2)
image1: https://dl.dropboxusercontent.com/u/49509038/img/vs2015_ctp6/img1.png
image2: https://dl.dropboxusercontent.com/u/49509038/img/vs2015_ctp6/img2.png
---
**Revisions:**
1) Created By Microsoft Connect (4/21/2015 4:46:12 AM)
------------------------</br>
Customer Information</br>
------------------------</br>
User ID: 10125130</br>
Handle: KakCAT</br>
</br>
---------------------------</br>
Connect Site Information</br>
---------------------------</br>
Site Name: Visual Studio and .NET Framework</br>
Site ID: 210</br>
Feedback ID: 1266613</br>
Feedback Form: 6049</br>
</br>
----------------------</br>
Problem Description</br>
-----------------------</br>
Hi,
Entering a # character forces all preprocessor entries to be indented again, even when all formatting options have been disabled. It also displaces some "}"s
My setup is: automatical formatting fully disabled , tabs size=4, keep tabs, indenting=none
I'm supplying two images to ease the explanation.
- Put your code like in image 1. Please note that there's a tabulation before "static void myfunc ()", so #if COND1 is not at the beginning of the line.
- Put the cursor where the cursor is in the image 1
- Type #
- The #if COND1 is automatically indented, and the closing bracket is moved to the right (shown in image 2)
image1: https://dl.dropboxusercontent.com/u/49509038/img/vs2015_ctp6/img1.png
image2: https://dl.dropboxusercontent.com/u/49509038/img/vs2015_ctp6/img2.png
---
2) Edited By Macy Qu (Shang Hai Wei Chuang Ruan Jian) (4/21/2015 8:11:12 PM)
repro on Win8.1 with VS2015 CTP6
---
opened 10:11AM - 05 Aug 15 UTC
Bug
Area-IDE
IDE-Formatter
Hello,
I don't know if this is an issue or not, because smart indenting is not … well defined anywhere (what is clear is that behaviour is different from previous VS versions)
In my coding style I usually remove the 2 initial nesting levels because I just feel they bring no information at all and they just waster screen space.
In example, my "typical" code looks like this

As said, no tabs after namespace nor class nor function definition. Everything inside "void bar" is smart-indenting style compliant and had no problems nor complaint until VS2015 appeared.
Now ,I continue typing at the cursor. I press 'enter', then myOtherFunc(); and enter again. This is the result

Smart tabbing puts my line below the previous line, and the cursor position too. I don't know if it's correct or not, but it's the way it works (and works well for me)
However in VS2015 this has turned hell. When typing myOtherFunc, VS2015 autoindents it as if the namespace and class would be indented as if I'd have obeyed the smart indenting method. This is the result in the current version of VS2015:

The indenter knows that if I had followed the guidelines, "call4()" should add 3 tabs, so it adds 3 tabs, no matter if the last '{' is tabbed with a different amount of tabs
So, typing the function autoindents EVERY line with 3 tabs. So, even if I "fix" the last typed line, the next line will be again tabbed 4 times and will have to fix it again.
So, my question is... is this the correct expected behaviour and VS2013 and previous versions were wrong? Is this a bug to be fixed in the future, or I must start changing thousands of files to match the imposed VS2015 smart indenting, or get used to block indenting again?
Thanks!
note: configuration for all my test in VS2013 and VS2015 are "Reset to defaults", then selected "Indenting Smart", "Keep tabs" and then disable all the "Automatically format..." in options: Text Editor/C#/Formatting
opened 11:54AM - 01 Aug 15 UTC
Bug
help wanted
Area-IDE
IDE-CodeStyle
Hi,
when pasting a snippet when using VS2015 RTM, the snippet is formatted as i… f indenting mode would be set smart no matter what indenting mode is selected. (not happenning with snippets which starts with '#', but I suppose it's because of my current configuration)
To reproduce, use block indenting and type this code
using System;
namespace ns
{
$
}
put cursor at (and delete) $, then type any snippet (i.e. wde <tab> <tab>)
p.s. sorry if this does not belong to this project, I'm quite lost with visual studio
and those are just the ones I’m tracking. The VS2015 editor has several other issues when you don’t strictly adhere one of the “de facto microsoft approved code style”.
My rule of thumb for any editor is: never touch my code (or at least, add an option to disable code “automodifications”). Since VS2015, this is no longer possible. Every time you type something is a random trigger to a plethora of automatic reformatting processes. In example, just typing a ‘#’ can reformat almost every line of your file is you don’t use a TAB to indent the namespaces.