473,722 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
+ 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 5024
Red
On Mon, 14 Apr 2008 03:05:16 -0400, Red <re*@nospam.com wrote:
>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.co mwrote:
On Mon, 14 Apr 2008 03:05:16 -0400, Red <r...@nospam.co mwrote:
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.co mwrote:
>On Mon, 14 Apr 2008 03:05:16 -0400, Red <r...@nospam.co mwrote:
>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.com wrote in message
news:o4******** *************** *********@4ax.c om...
On Tue, 15 Apr 2008 07:21:44 -0700 (PDT), Chris Dunaway
<du******@gmail .comwrote:
>>On Apr 15, 12:56 am, Red <r...@nospam.co mwrote:
>>On Mon, 14 Apr 2008 03:05:16 -0400, Red <r...@nospam.co mwrote:
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********@hot mail.com>
wrote:
>
"Red" <Re*@nospam.com wrote in message
>>>On Apr 15, 12:56 am, Red <r...@nospam.co mwrote:
On Mon, 14 Apr 2008 03:05:16 -0400, Red <r...@nospam.co mwrote:
>>>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.com wrote in message
news:2l******** *************** *********@4ax.c om...
On Tue, 15 Apr 2008 08:46:21 -0700, "Mythran" <ki********@hot mail.com>
wrote:
>>
"Red" <Re*@nospam.com wrote in message
>>>>On Apr 15, 12:56 am, Red <r...@nospam.co mwrote:
On Mon, 14 Apr 2008 03:05:16 -0400, Red <r...@nospam.co mwrote:
>>>>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********@hot mail.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.com wrote:
>On Thu, 17 Apr 2008 09:27:27 -0700, "Mythran" <ki********@hot mail.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
successfull y 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
5045
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 column, ALTER TABLE `icons` CHANGE `name_farsi` `name_farsi` VARCHAR( 99 ) CHARACTER SET utf8 COLLATE utf8_persian_ci DEFAULT NULL and change default charset of database like below code :
2
2514
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 pointer or reference to a derived type of the base class's return type. In .NET the overridden virtual function is similar, but an actual parameter of the function can be a derived reference from the base class's reference also. This dichotomy...
0
1557
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 called "TestItem" that are inherited from Control. i have added,To the TestItem class, a proprety called "ItemIcon", and I added to this property the attribute Editor(typeof(ImageUrlEditor)....). In design-time, I can access the "ItemList" property...
49
1624
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
1477
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 DataSet or Stored Procedure does not exist in VS2008. This is definitive or in next dates there will be more templates?
2
2443
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 installed but can't find the site now. Is there a problem? Would reinstalling vs2008 fix any problem that may occur because of uninstalling vs2005.
2
989
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 parameters to the Insert command (OleDbCommand BTW, going into an Access database):
4
1191
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: http://www.microsoft.com/downloads/details.aspx?FamilyID=fbee1648-7106- 44a7-9649-6d9f6d58056e
19
2104
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 year.... another initiative is exporting the speech recognition environment to the Linux context. In a nutshell, he dictated to application on Windows, it tunnels over the network to a Linux machine, and will allow you to cut and paste to and...
0
8863
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8739
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9384
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9157
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8052
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5995
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4502
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2602
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.