VS replaces tabs by spaces

This forum is meant for anything you would like to share with other visitors
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

VS replaces tabs by spaces

Post by ic2 »

I often see that my tabs in VS like in front of comments change into spaces, e.g.

IF x==1 <tab><tab><tab><tab> // Here my comment
(All <tab> become groups of 4 spaces)

I switched
Text Editor > Advanced and "Use adaptive formatting off
and have Keep tabs, smart Indent set everywhere.

Reproducible: It (at least) ALWAYS happens when I copy a line (also in C#).

Is there any way to prevent this "space replacement"?

Dick
User avatar
Chris
Posts: 4898
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

VS replaces tabs by spaces

Post by Chris »

Hi Dick,

Is that on a regular prg file, or in a file associated with a form? I just now received a similar report for form related prg files, which I confirmed.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

VS replaces tabs by spaces

Post by ic2 »

Hi Chris,

I always see it on regular code, like .prg or .cs files.

I've seen it mentioned in the Microsoft sites as well (also with "when will this ever be solved") but not so much lately. And as Robert didn't directly recognize it I thought I was maybe missing some setting (or at least: that's what I hope :)

Dick
User avatar
Chris
Posts: 4898
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

VS replaces tabs by spaces

Post by Chris »

Hi Dick,

That's strange, have never seen something like that. Can you please post a link to such a report about c#? Not seeing it myself in neither X# or c#, but this might give a hint on how to reproduce it.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

VS replaces tabs by spaces

Post by ic2 »

Hello Chris,

https://developercommunity.visualstudio ... paces.html

Here it is posted with the Adaptive formatting (what where they thinking when they programmed this...) as solution, but that doesn't help.

https://developercommunity.visualstudio ... f-tab.html

Do you actually retain tabs when you copy and then paste a line ? For me all tabs are directly replaced with spaces in the pasted line.

Here's the search URL (5 pages with this problem)

https://developercommunity.visualstudio ... ad+of+tabs

Dick
User avatar
Chris
Posts: 4898
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

VS replaces tabs by spaces

Post by Chris »

Hi Dick,

Yeah, it works fine for me...maybe VS is trying to be nice to me to make me start using it :) :) :)

Seriously, I have never seen that... Does anybody else see this behavior guys? Any hint in order to reproduce it would be very much appreciated...
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

VS replaces tabs by spaces

Post by FFF »

ic2 wrote:Do you actually retain tabs when you copy and then paste a line ? For me all tabs are directly replaced with spaces in the pasted line.
Hi Dick,
for you i started VS17, no customization at all, and tried on a simple winforms app. First, i have no clue, how to make whitespace visible, but i think one sees here, that my two starting tabs are retained.
Tab-Copy.gif
Tab-Copy.gif (72.73 KiB) Viewed 703 times
(OT: This "ScreenToGif" is a cool thing!)
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

VS replaces tabs by spaces

Post by ic2 »

Hello Karl, Chris,

That seems to work fine for you indeed Karl.But I've no idea what setting I have different.

Dick
User avatar
Chris
Posts: 4898
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

VS replaces tabs by spaces

Post by Chris »

FFF wrote: (OT: This "ScreenToGif" is a cool thing!)
Very cool indeed! Which app did you use?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

VS replaces tabs by spaces

Post by FFF »

Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Post Reply