473,464 Members | 1,476 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem with VS2008 editor: How to force insert of tab

Red
If auto-format is turned off in VS2008, there is apparently no way to
indent a line. Under Tools->Options->Text Editor->C#->Formatting,
there are three checkboxes. Unchecking those seems to cause this
behavior.

I'd simply like to have the tab key insert a tab at the beginning of a
line. I believe that there were publlished macros for doing this in
earlier VS versions, but I expected this to be 'fixed' in VS2008. Yes,
I realize someone will say this is a feature, but it seems reasonable
to be able to simply insert a tab when required.
Jun 27 '08 #1
8 5012
Red
On Mon, 14 Apr 2008 03:05:16 -0400, Red <re*@nospam.comwrote:
>If auto-format is turned off in VS2008, there is apparently no way to
indent a line. Under Tools->Options->Text Editor->C#->Formatting,
there are three checkboxes. Unchecking those seems to cause this
behavior.

I'd simply like to have the tab key insert a tab at the beginning of a
line. I believe that there were publlished macros for doing this in
earlier VS versions, but I expected this to be 'fixed' in VS2008. Yes,
I realize someone will say this is a feature, but it seems reasonable
to be able to simply insert a tab when required.
No word on this? I am not sure whether to log this with Microsoft, as
I'm sure they'll say it's a 'feature.' But givent that turning those
three checkboxes off seems to render the editor unusable, it would
seem like it.

Has anyone got a workaround or more info?
Jun 27 '08 #2
On Apr 15, 12:56 am, Red <r...@nospam.comwrote:
On Mon, 14 Apr 2008 03:05:16 -0400, Red <r...@nospam.comwrote:
If auto-format is turned off in VS2008, there is apparently no way to
indent a line. Under Tools->Options->Text Editor->C#->Formatting,
there are three checkboxes. Unchecking those seems to cause this
behavior.
I'd simply like to have the tab key insert a tab at the beginning of a
line. I believe that there were publlished macros for doing this in
earlier VS versions, but I expected this to be 'fixed' in VS2008. Yes,
I realize someone will say this is a feature, but it seems reasonable
to be able to simply insert a tab when required.

No word on this? I am not sure whether to log this with Microsoft, as
I'm sure they'll say it's a 'feature.' But givent that turning those
three checkboxes off seems to render the editor unusable, it would
seem like it.

Has anyone got a workaround or more info?
Have you tried the settings under Tools->Options->Text Editor->C#-
>Tabs? Perhaps these will get you what you want.
Chris
Jun 27 '08 #3
Red
On Tue, 15 Apr 2008 07:21:44 -0700 (PDT), Chris Dunaway
<du******@gmail.comwrote:
>On Apr 15, 12:56 am, Red <r...@nospam.comwrote:
>On Mon, 14 Apr 2008 03:05:16 -0400, Red <r...@nospam.comwrote:
>If auto-format is turned off in VS2008, there is apparently no way to
indent a line. Under Tools->Options->Text Editor->C#->Formatting,
there are three checkboxes. Unchecking those seems to cause this
behavior.
>I'd simply like to have the tab key insert a tab at the beginning of a
line. I believe that there were publlished macros for doing this in
earlier VS versions, but I expected this to be 'fixed' in VS2008. Yes,
I realize someone will say this is a feature, but it seems reasonable
to be able to simply insert a tab when required.

No word on this? I am not sure whether to log this with Microsoft, as
I'm sure they'll say it's a 'feature.' But givent that turning those
three checkboxes off seems to render the editor unusable, it would
seem like it.

Has anyone got a workaround or more info?

Have you tried the settings under Tools->Options->Text Editor->C#-
>>Tabs? Perhaps these will get you what you want.

Chris
Hi Chris,

Thanks for your reply. The 'tabs' settings do not have any affect,
since the editor enforces its own notion of indentation. That notion,
in this case, seems to be keeping all code at the very left side of
the page. IOW, tabs are disabled.

Surely there must be some option that would override that behavior,
but I haven't found it. That's why it seems like a bug, for lack of a
better term.

Jun 27 '08 #4


"Red" <Re*@nospam.comwrote in message
news:o4********************************@4ax.com...
On Tue, 15 Apr 2008 07:21:44 -0700 (PDT), Chris Dunaway
<du******@gmail.comwrote:
>>On Apr 15, 12:56 am, Red <r...@nospam.comwrote:
>>On Mon, 14 Apr 2008 03:05:16 -0400, Red <r...@nospam.comwrote:
If auto-format is turned off in VS2008, there is apparently no way to
indent a line. Under Tools->Options->Text Editor->C#->Formatting,
there are three checkboxes. Unchecking those seems to cause this
behavior.

I'd simply like to have the tab key insert a tab at the beginning of a
line. I believe that there were publlished macros for doing this in
earlier VS versions, but I expected this to be 'fixed' in VS2008. Yes,
I realize someone will say this is a feature, but it seems reasonable
to be able to simply insert a tab when required.

No word on this? I am not sure whether to log this with Microsoft, as
I'm sure they'll say it's a 'feature.' But givent that turning those
three checkboxes off seems to render the editor unusable, it would
seem like it.

Has anyone got a workaround or more info?

Have you tried the settings under Tools->Options->Text Editor->C#-
>>>Tabs? Perhaps these will get you what you want.

Chris

Hi Chris,

Thanks for your reply. The 'tabs' settings do not have any affect,
since the editor enforces its own notion of indentation. That notion,
in this case, seems to be keeping all code at the very left side of
the page. IOW, tabs are disabled.

Surely there must be some option that would override that behavior,
but I haven't found it. That's why it seems like a bug, for lack of a
better term.
I have all three options unchecked, and that's how I've been developing.
Tabs work fine for me.

Mythran
Jun 27 '08 #5
Red
On Tue, 15 Apr 2008 08:46:21 -0700, "Mythran" <ki********@hotmail.com>
wrote:
>
"Red" <Re*@nospam.comwrote in message
>>>On Apr 15, 12:56 am, Red <r...@nospam.comwrote:
On Mon, 14 Apr 2008 03:05:16 -0400, Red <r...@nospam.comwrote:
>>>If auto-format is turned off in VS2008, there is apparently no way to
indent a line. Under Tools->Options->Text Editor->C#->Formatting,
there are three checkboxes. Unchecking those seems to cause this
behavior.

I'd simply like to have the tab key insert a tab at the beginning of a
line. I believe that there were publlished macros for doing this in
earlier VS versions, but I expected this to be 'fixed' in VS2008.
>I have all three options unchecked, and that's how I've been developing.
Tabs work fine for me.
Hi Mythran,

Thanks for your reply! That's what I was waiting to hear (or not!).
Just to clarify my post, here is what I refer to... If I create a new
empty project and insert the following lines, they cannot be indented
by inserting a tab in front of them:

-----------------------------------------------------------------------------------

namespace Test
{
public partial class Form1 : Form
{
int q = 12;
int y = 12;
int z = 234;

----------------------------------------------------------------------------------

IOW, any inserted statement is kept at the left side (when the
auto-indent options are turned off).

If you don't have this problem with VS2008, then there must be a
difference between our editor options. I've copied all my settings
below. Do you see any differences from yours?

Editor settings follow. Looks long but I think it's only 5 pages::
--------------------------------------------------------------------------------

Tools->Options:
Environment:
Keyboard: Emacs
Text Editor:
C#:
General:
Statemment completion:
[x] Auto list members
[ ] Hide advanced members
[x] Parameter information
Settings:
[ ] Enable Virtual space
[ ] Word wrap
[x] Apply Cut/Copy commands to blank lines when no
selection
Display:
[ ] Line Numbers
[x] Enable single-click URL navigation
[x] Navigation bar
Tabs:
Indenting:
( ) None
( ) Block
( ) Smart
Tab:
Tab Size: 4
Indent Size: 4
( ) Insert spaces
(x) Keep tabs
Advanced:
Outlining:
[x] Enter outlining mode when files open
Editor Help:
[x] Underline errors in the editor
Refactoring:
[ ] Warn if build errors exist when refactoring
[x] Warn on members with compiler generated references
XML Documentation Comments:
[x] Generate XML documentation comments for ///
Implement Interface:
[x] Surrund generated code with #region
Organize Usings:
[x] Warn if build errors exist when organizing usings
[x] Place 'System' directives first when sorting
usings
Formatting:
General: (all three below were checked by default)
[x] Automatically format completed statement on ;
[x] Automatically format completed statement on }
[x] Adjust indentation on paste
Indentation:
[x] Indent block contents
[ ] Indent open and close braces
[x] Indent case contents
[ ] Indent case labels
Label Indentation:
( ) Place goto labels in leftmost column
(x) Place goto labels one indent less than current
( ) Indent labels normally
New Lines:
New line options for braces:
[x] Place open brace on new line for types
[x] Place open brace on new line for methods
[x] Place open brace on new line for anonymous
methods
[ ] Place open brace on new line for control
blocks
[x] Place open brace on new line for anonymous
types
[x] Place open brace on new line for object
initializers
[x] Place open brace on new line for lambda
expressions
New line options for keywords:
[ ] Place 'else' on new line
[ ] Place 'catch' on new line
[ ] Place 'finally' on new line
New line options for expressions:
[x] Place members in object initializers on new
line
[x] Place members in anonymous types on new line
[x] Place query expression clauses on new line
Spacing:
(all unchecked except...)
Set other spacing options:
[x] Insert space after keywords in control flow
statements
[?] Ignore spaces in delaration statements
Set spacing for delimiters:
[x] Insert space after colon for base or interface
in type..
[x] Insert space after comma
[ ] Insert space after dot
[x] Insert space afer semicolon in "for" stateent
[x] Insert space before colon for base ...in type
decl.
[ ] Insert space before comma
[ ] Insert space before dot
[ ] Insert space before semicolonn in "for"
statement
Wrapping:
[x] Leave block on single line
[ ] Leave statements and member declarations on the
same line
IntelliSense:
Completion Lists:
[x] Show completion list after a character is typed
Selection in Completion List:
Committed by typing the following characters:
{}[]().,:;+-*/%&|^!~=<>?@#'"\
[x] Committed by pressing the space bar
[ ] Add new line on commit with enter at end of fully
typed word
Intellisense Member Selection
[x] IntelliSense pre-selects most recently used
members

Jun 27 '08 #6


"Red" <re*@nospam.comwrote in message
news:2l********************************@4ax.com...
On Tue, 15 Apr 2008 08:46:21 -0700, "Mythran" <ki********@hotmail.com>
wrote:
>>
"Red" <Re*@nospam.comwrote in message
>>>>On Apr 15, 12:56 am, Red <r...@nospam.comwrote:
On Mon, 14 Apr 2008 03:05:16 -0400, Red <r...@nospam.comwrote:
>>>>If auto-format is turned off in VS2008, there is apparently no way to
indent a line. Under Tools->Options->Text Editor->C#->Formatting,
there are three checkboxes. Unchecking those seems to cause this
behavior.
>
I'd simply like to have the tab key insert a tab at the beginning of
a
line. I believe that there were publlished macros for doing this in
earlier VS versions, but I expected this to be 'fixed' in VS2008.
>>I have all three options unchecked, and that's how I've been developing.
Tabs work fine for me.

Hi Mythran,

Thanks for your reply! That's what I was waiting to hear (or not!).
Just to clarify my post, here is what I refer to... If I create a new
empty project and insert the following lines, they cannot be indented
by inserting a tab in front of them:

-----------------------------------------------------------------------------------

namespace Test
{
public partial class Form1 : Form
{
int q = 12;
int y = 12;
int z = 234;

----------------------------------------------------------------------------------

IOW, any inserted statement is kept at the left side (when the
auto-indent options are turned off).

If you don't have this problem with VS2008, then there must be a
difference between our editor options. I've copied all my settings
below. Do you see any differences from yours?

Editor settings follow. Looks long but I think it's only 5 pages::
--------------------------------------------------------------------------------

Tools->Options:
Environment:
Keyboard: Emacs
Text Editor:
C#:
General:
Statemment completion:
[x] Auto list members
[ ] Hide advanced members
[x] Parameter information
Settings:
[ ] Enable Virtual space
[ ] Word wrap
[x] Apply Cut/Copy commands to blank lines when no
selection
Display:
[ ] Line Numbers
[x] Enable single-click URL navigation
[x] Navigation bar
Tabs:
Indenting:
( ) None
( ) Block
( ) Smart
Tab:
Tab Size: 4
Indent Size: 4
( ) Insert spaces
(x) Keep tabs
Advanced:
Outlining:
[x] Enter outlining mode when files open
Editor Help:
[x] Underline errors in the editor
Refactoring:
[ ] Warn if build errors exist when refactoring
[x] Warn on members with compiler generated references
XML Documentation Comments:
[x] Generate XML documentation comments for ///
Implement Interface:
[x] Surrund generated code with #region
Organize Usings:
[x] Warn if build errors exist when organizing usings
[x] Place 'System' directives first when sorting
usings
Formatting:
General: (all three below were checked by default)
[x] Automatically format completed statement on ;
[x] Automatically format completed statement on }
[x] Adjust indentation on paste
Indentation:
[x] Indent block contents
[ ] Indent open and close braces
[x] Indent case contents
[ ] Indent case labels
Label Indentation:
( ) Place goto labels in leftmost column
(x) Place goto labels one indent less than current
( ) Indent labels normally
New Lines:
New line options for braces:
[x] Place open brace on new line for types
[x] Place open brace on new line for methods
[x] Place open brace on new line for anonymous
methods
[ ] Place open brace on new line for control
blocks
[x] Place open brace on new line for anonymous
types
[x] Place open brace on new line for object
initializers
[x] Place open brace on new line for lambda
expressions
New line options for keywords:
[ ] Place 'else' on new line
[ ] Place 'catch' on new line
[ ] Place 'finally' on new line
New line options for expressions:
[x] Place members in object initializers on new
line
[x] Place members in anonymous types on new line
[x] Place query expression clauses on new line
Spacing:
(all unchecked except...)
Set other spacing options:
[x] Insert space after keywords in control flow
statements
[?] Ignore spaces in delaration statements
Set spacing for delimiters:
[x] Insert space after colon for base or interface
in type..
[x] Insert space after comma
[ ] Insert space after dot
[x] Insert space afer semicolon in "for" stateent
[x] Insert space before colon for base ...in type
decl.
[ ] Insert space before comma
[ ] Insert space before dot
[ ] Insert space before semicolonn in "for"
statement
Wrapping:
[x] Leave block on single line
[ ] Leave statements and member declarations on the
same line
IntelliSense:
Completion Lists:
[x] Show completion list after a character is typed
Selection in Completion List:
Committed by typing the following characters:
{}[]().,:;+-*/%&|^!~=<>?@#'"\
[x] Committed by pressing the space bar
[ ] Add new line on commit with enter at end of fully
typed word
Intellisense Member Selection
[x] IntelliSense pre-selects most recently used
members
After reviewing the tab issue, I found that it seems to only apply to the
Emacs schema. I checked the Edit.InsertTab command and it does show as
"Tab" for Emacs, but it just doesn't insert the tab. I also checked other
various settings and couldn't find one that allowed the Emacs scheme to
successfully insert the tab...quite strange...

Mythran
Jun 27 '08 #7
Red
On Thu, 17 Apr 2008 09:27:27 -0700, "Mythran" <ki********@hotmail.com>
wrote:
>After reviewing the tab issue, I found that it seems to only apply to the
Emacs schema. I checked the Edit.InsertTab command and it does show as
"Tab" for Emacs, but it just doesn't insert the tab. I also checked other
various settings and couldn't find one that allowed the Emacs scheme to
successfully insert the tab...quite strange...

Mythran
Hi Mythran,

Are you using Emacs? That is my usual editor. Unfortunately this
happens with both the regular C# editor and with Emacs. With VS2005,
there were macros that were designed to fix problems like this. But I
thought that by 2008 they may have addressed them (plenty of reports
on the MS website).

Also, I don't quite follow your comment. Did the tab key not work for
you after all? I was referring to entering tabs at the start of a
line, as in the code I had posted. Does that work for you? If not,
then how are you getting your code indented?

(Again, thanks for your reply. Maybe this will eventually solve a
problem for you as well, if you're using Emacs emu).
Jun 27 '08 #8
Red
On Thu, 17 Apr 2008 21:21:09 -0500, Red <Re*@nospam.comwrote:
>On Thu, 17 Apr 2008 09:27:27 -0700, "Mythran" <ki********@hotmail.com>
wrote:
>>After reviewing the tab issue, I found that it seems to only apply to the
Emacs schema. I checked the Edit.InsertTab command and it does show as
"Tab" for Emacs, but it just doesn't insert the tab. I also checked other
various settings and couldn't find one that allowed the Emacs scheme to
successfully insert the tab...quite strange...

Mythran

Hi Mythran,

Are you using Emacs? That is my usual editor. Unfortunately this
happens with both the regular C# editor and with Emacs. With VS2005,
there were macros that were designed to fix problems like this. But I
thought that by 2008 they may have addressed them (plenty of reports
on the MS website).

Also, I don't quite follow your comment. Did the tab key not work for
you after all? I was referring to entering tabs at the start of a
line, as in the code I had posted.
.....

Sorry...I read your reply again and realized that you are probably not
using Emacs keyboard mapping. But I also rechecked various other
mapping options (C#2005, Visual Studio, etc) and none of them will
insert a tab for me.

So even in non-Emacs configuration there is still something different
between the way our VS2008's are working, Apparently that difference
is not showing up in the options menu. Sad that this was not fixed in
VS2008.
Jun 27 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: sinasalek | last post by:
i have a problem with MySQL 4.1.x and UTF8. in version 4.0, i'm using html forms with utf8 charset for inserting unicode strings. but in version 4.1.x it is not working! if i change the charset of...
2
by: Edward Diener | last post by:
In C++ an overridden virtual function in a derived class must have the exact same signature of the function which is overridden in the base class, except for the return type which may return a...
0
by: michael | last post by:
Hi. I have a problem using the CollectioEditor. In my custom control I have a public property that returns ItemList. ItemList is inherited from CollectionBase and contains very simple items...
49
by: W. Watson | last post by:
Is there an editor that allows one to position to put the cursor and then by pushing some button goes to the end of the def? -- Wayne Watson (Nevada City, CA) Web Page: <speckledwithStars.net>
14
by: =?Utf-8?B?VG9tYXM=?= | last post by:
I am using the Professional version. In VS2005, in a C++/CLI project, to create a new item, there were 9 templates and in VS2008 there are only 3 templates. For example, now the template for...
2
by: Academia | last post by:
I have vs2005 installed on the System disk and vs2008 installed on a different disk. I want to remove VS2005. I read one time about some problem with uninstalling vs2005 after vs2008 is...
2
by: Tom | last post by:
This is driving me crazy ... I have a typed dataset that I created using VS2008. I created an Insert statement: "INSERT INTO x (v1, v2, v3, ..., vN) VALUES (?, ?, ?, ... N?)" Then I add...
4
by: Jon Skeet [C# MVP] | last post by:
Direct links work well; I had problems with MSDN subscriptions: ..NET 3.5 SP1: http://www.microsoft.com/downloads/details.aspx?FamilyID=ab99342f-5d1a- 413d-8319-81da479ab0d7 VS2008 SP1:...
19
by: Eric S. Johansson | last post by:
Almar Klein wrote: there's nothing like self interest to drive one's initiative. :-) 14 years with speech recognition and counting. I'm so looking to my 15th anniversary of being injured next...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.