Gary,
The same thing applies when creating a project that has files that are
intended to be edited. If I create a test project for an MFC app with the
default conditions, a number of files are created - test.cpp, testdoc.cpp,
MainFrm.cpp, etc. Everyone of these files is full of tabs put there by the
create wizard. These are intended for me to add my own code and it's
certainly a mess when there is a mix of tabs and spaces.
Hopefully this will also be addressed in the upcoming version.
Ed
> Hi Ed,
>
[quoted text clipped - 24 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Yan-Hong Huang[MSFT] - 14 Feb 2005 05:45 GMT
Hi Ed,
Gary dones't feel well and is taking sick leave today. So I backup this
issue.
Based on my experience, all the format setting of VS.NET IDE can be found
at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/ht
ml/vxtskManagingCodeFormatting.asp
To replace Tab with Space, we can set "Insert Spaces" Option.
If you met any unexpected behavior, could you please post the detailed
repro steps here? We will follow the steps and pass it to our product team
if we can reproduce the issue.
Thanks very much.
Best regards,
Yanhong Huang
Microsoft Community Support
Get Secure! ¨C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
p&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
Yan-Hong Huang[MSFT] - 14 Feb 2005 05:52 GMT
Hi Ed,
The repro steps mean:
1) Detailed steps when you created the project
2) Setting in IDE at that time
3) Which line of IDE generated code has that error?
Thanks very much.
Best regards,
Yanhong Huang
Microsoft Community Support
Get Secure! ¨C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
p&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
Edward Mitchell - 14 Feb 2005 15:01 GMT
Yanhong,
I just create a new project and select Visual C++ Projects and MFC
Application. I name the project Test and create in C:\Temp. Hit the
"Finish" button to create the default project.
Under Tools>Options>Text Editor>Tabs I define the tab and indent sizes as 4
and the radio button "Insert spaces" is checked.
Now look at TestDoc.cpp, TestView.cpp, MainFrm.cpp. The are all full of
tabs!
Ed
----- Original Message -----
From: "Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com>
Newsgroups: microsoft.public.vstudio.setup
Sent: Monday, February 14, 2005 12:52 AM
Subject: Re: Can I Expand Tabs to Spaces in Wizard Generated Files
> Hi Ed,
>
[quoted text clipped - 16 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Gary Chang[MSFT] - 15 Feb 2005 09:53 GMT
Hi Ed,
>Under Tools>Options>Text Editor>Tabs I define the tab and indent sizes as 4
>and the radio button "Insert spaces" is checked.
>
>Now look at TestDoc.cpp, TestView.cpp, MainFrm.cpp. The are all full of
>tabs!
The "Insert spaces" setting is just for the "Tab" of user's input, I mean
when you type your code in the code editor window, the setting works.
However on the other hand, those wizard generated code is some part of the
VC Wizard's template file, it is not generated by the VS.NET IDE char by
char, so the VS.NET's setting will not take effect to the VC Wizard
generated code.
Thanks for your understanding!
Best regards,
Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
Edward Mitchell - 18 Mar 2005 04:30 GMT
Just to finish the topic off!
I found the best way to remove the tabs is to select all the code in the
routine and then invoke Edit>Advanced>Untabify Selection. This will remove
all the tabs and if the tab equivalent is set to 4 spaces, do what I want.
A litttle extra work but not impossible. I can see that the templates that
are used have to be tabs or no-tabs consistently.
Ed
> Hi Ed,
>
[quoted text clipped - 26 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Gary Chang[MSFT] - 18 Mar 2005 07:04 GMT
Bingo Ed,
thanks for your update and sharing this useful tip with us!
Have a good day!
Best regards,
Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.