Visual C++ wizards ignore the "Insert spaces" TAB setting (178995)
The information in this article applies to:
- Microsoft Visual C++ 4.0
- Microsoft Visual C++ 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q178995 SYMPTOMS AppWizard and ClassWizard always generate code indented
with tabs, regardless of the "Insert Spaces" setting. RESOLUTIONVisual C++ 5.0 and 6.0 To remove all undesired tab characters from text displayed in
Visual C++ Developer Studio, use the Untabify feature. To "untabify" a set of lines:
- Select the line(s) containing the undesired tab characters.
To select the entire document, click Select All on the Edit menu.
- Click Advanced on the Edit menu, then click Untabify Selection. Spaces replace tab characters. The selected text's visible
formatting does not change. All tab characters are correctly replaced by an
appropriate number of spaces.
Visual C++ 4.x To remove undesired tab characters from text displayed in Visual
C++ versions earlier than 5.0, use the Replace feature. Follow these steps:
- Determine your tab expansion setting. Click Options on the Tools menu, then click Tabs on the dialog box. Note the setting labeled Tab size.
- Select the line(s) containing the undesired tab characters.
To remove tabs from the entire document, see step 4.
- Click Replace on the Edit menu. In the Find what field, type a number of spaces corresponding to the "Tab size"
setting. In the Replace with field, type in the same number of spaces.
- In the Replace in section, select either Selection or Whole file. Click OK. Leading and full-width tabs are now replaced with spaces.
- To remove tabs whose effective widths do not correspond to
the Tab size setting (tabs between text), repeat replacing as in steps 3 and 4
but with one less space each time in the Find what and Replace with fields. After replacing all single spaces with single spaces,
there will be no remaining tabs in the selection.
STATUS This behavior is by design.
Modification Type: | Major | Last Reviewed: | 6/1/2005 |
---|
Keywords: | kbtshoot kbbug kbCodeGen kbfix kbide kbwizard KB178995 kbAudDeveloper |
---|
|