TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Keep tabs option in VS 2015 is not preserved

Open NeuwirthD opened this issue 11 years ago • 46 comments

When I select "Keep tabs" option in Visual Studio 2015 I get "Insert spaces" option selected on the next run of Visual Studio.

Visual Studio: 14.0.23107.0 TypeScript: 1.5.3.0

NeuwirthD avatar Aug 12 '15 10:08 NeuwirthD

perhaps related to #4014

nippur72 avatar Aug 12 '15 14:08 nippur72

Same versions and result as NeuwirthD. Frustrating and creating a lot of trash diffs on source that was all 'keep tabs' previously. The CurrentSettings.vssettings file keeps getting overwritten by a InsertTabs: false value on VS close. Changing the option in the UI writes the correct value to the file at the time changes are saved.

alan-compeat avatar Aug 14 '15 20:08 alan-compeat

Every member of our team experience the same problem. Any workarounds?

M0ns1gn0r avatar Aug 20 '15 11:08 M0ns1gn0r

@ahmad-farid can you take a look

mhegazy avatar Aug 20 '15 19:08 mhegazy

Any updates on this?

BobStrogg avatar Sep 22 '15 14:09 BobStrogg

@paulvanbrenk can you take a look.

mhegazy avatar Sep 22 '15 16:09 mhegazy

I don't reproduce this on VS 2015 + TS 1.6

Do you have multiple instances of VS open, maybe on multiple machines? Do you sync your settings (see the synchronized settings option)? Do you have other extensions installed?

paulvanbrenk avatar Sep 22 '15 17:09 paulvanbrenk

Hadn't noticed this was just for Typescript... I'm seeing this issue with C#, whether I set the language setting directly or through "All languages". It appears to lose the setting when you close VS (or perhaps just opening a new instance is enough). Happens every time, and loses "keep tabs" and "smart tabs" setting. Vs2013 continues to work correctly.

BobStrogg avatar Sep 22 '15 19:09 BobStrogg

The number of instances of VS doesn't matter, it happens even if I open only one instance of VS. I use VS on one machine. Yes, I synchronize settings. Yes, I have several other extensions installed.

NeuwirthD avatar Sep 23 '15 06:09 NeuwirthD

@paulvanbrenk I can confirm, with Typescript 1.6.3.0 the original issue doesn't reproduce anymore.

M0ns1gn0r avatar Sep 23 '15 08:09 M0ns1gn0r

After upgrading to TypeScript 1.6.3.0 I can still reproduce this issue.

NeuwirthD avatar Sep 23 '15 11:09 NeuwirthD

@NeuwirthD which extensions do you have installed, does it reproduce when you disable all of them? Does it reproduce for other languages?

paulvanbrenk avatar Sep 23 '15 16:09 paulvanbrenk

No extensions at all on my install. I am signed into msdn account though, so maybe sync related...

BobStrogg avatar Sep 23 '15 17:09 BobStrogg

Can you please check whether it still repros while signed out? And can you please send me the files under %localappdata%\Microsoft\visualstudio\settingslogs? Thanks!

JoshuaBStevens avatar Sep 23 '15 21:09 JoshuaBStevens

Yep signed out and same issue. Tried setting in "All languages" and just C#. Exited and re-opened VS, and C# reverted to "Insert spaces". I could send a video if it'll help.

BobStrogg avatar Sep 23 '15 21:09 BobStrogg

Will you be able to send the setting logs I requested?

JoshuaBStevens avatar Sep 24 '15 02:09 JoshuaBStevens

For me it only happens for TypeScript language.

NeuwirthD avatar Sep 24 '15 06:09 NeuwirthD

any chance that #4014 is addressed too?

nippur72 avatar Sep 24 '15 07:09 nippur72

Thanks to @NeuwirthD we've identified the root cause of the problem. We'll be fixing it in a future release (I'm not sure which one yet), but as a workaround you can do this:

  1. Shut down all running instances of VS.
  2. Delete value “Insert Tabs” under HKCU\Software\Microsoft\Visualstudio\14.0\Text Editor.
  3. Find the .pkgdef file that sets the value DefaultToInsertSpaces for your language. For TypeScript, this is %programfiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript\TypeScriptVisualStudio.pkgdef.
  4. In the .pkgdef file, change DefaultToInsertSpaces from 1 to 0.
  5. Run devenv /setup.

JoshuaBStevens avatar Oct 14 '15 15:10 JoshuaBStevens

@JoshuaBStevens, I am using Visual Studio 2015 Community Edition Update 3 and I still see this with C#. Set the setting, exit and restart Visual Studio and it's back. Settings synchronization is also turned off... A grep of the Visual Studio common extensions folder does not make it immediately obvious which file I would edit to save myself from this space-ridden nightmare.

user@localhost:/mnt/c/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Microsoft$ grep -Ri "DefaultToInsertSpaces" .
./ReportingServices/ReportDesigner.PkgDef:"DefaultToInsertSpaces"=dword:00000000
./Roslyn/Language Services/VisualBasicPackageRegistration.pkgdef:"DefaultToInsertSpaces"=dword:00000001
./TypeScript/TypeScriptVisualStudio.pkgdef:"DefaultToInsertSpaces"=dword:00000001
./Web/ASPX/HTML_Editor_Reg.pkgdef:"DefaultToInsertSpaces"=dword:00000001
./Web/ASPX/HTML_Editor_Reg.pkgdef:"DefaultToInsertSpaces"=dword:00000001
./WebClient/Language Service/Microsoft.VisualStudio.JSLS.pkgdef:"DefaultToInsertSpaces"=dword:00000001
./WebClient/Language Service/Microsoft.VisualStudio.JSLS.pkgdef:"DefaultToInsertSpaces"=dword:00000001
Binary file ./XamlLanguageService/Microsoft.VisualStudio.DesignTools.XamlLanguageService.dll matches
user@localhost:/mnt/c/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Microsoft$

mmaguigan avatar Aug 08 '16 01:08 mmaguigan