print source code - tabs ignored

  • Thread starter Thread starter Steve Richter
  • Start date Start date
S

Steve Richter

in the vs studio editor, I change the tab indent from 4 to 2. And my
C# code displays with 2 characters per indent level instead of 4. But
when I print, the indent is back to 4.

also, when a stmt with a lot of paramters does not fit on a single
line, I use tabs to get all the parms to line up one under the other:
CallMethodWithManyParms( parm1,
tab tab tab tab parm2,
tab tab tab tab parm3 ) ;

but again when I print, all the tabs are ignored and the text from the
additional lines starts in column 1.
CallMethodWithManyParms( parm1,
parm2,
parm3 ) ;

How do I get the c# editor to print the page the same as it looks?

thanks,

-Steve
 
Hi Steve,

Thanks for posting in this group.
This is an already known issue, tab size is hard coded in the print code.
And unfortunately I can not find a workaround for this issue.
But we have reported this issue to our product team.
Thanks for your understanding.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi Steve,

Thanks for posting in this group.
This is an already known issue, tab size is hard coded in the print code.
And unfortunately I can not find a workaround for this issue.
But we have reported this issue to our product team.
Thanks for your understanding.

Hi Jeffrey,

When the product team fixes the problem will the fix be available via
a service pack?

Can I write a VS macro that would print a source file?

thanks for the help,

-Steve
 
Steve, the .cs is just a simple text file. I've been playing around with a
Pretty Printer and it's no problem.
 
Hi Steve,

Thanks for your feedback.
I can not confirm the fix way of this issue, may be it is still being
considered.
As I think, your own print code will only print the content of the .cs file
as plain text file. It will not apply the support of VS.net editor, so it
will only use the tab size of text file.(If you use notpad to open the .cs
file, you will find the tab size remain the default, while not the setting
of VS.net editor).

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top