Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After an upgrade to VS2010 from VS2008 for C# and Fortran development I have noticed some peculiar behavior. While editing source files (.cs, .for, .f90) my tab key does not insert a tab character, it won't indent code and it won't code complete. I tried it with VS2008 and everything works fine. Note that shift-Tab works ok to un-indent.

I tried devenv /safemode and I did fix things.

If anyone has seen this before please give me a hint as how to fix this issue.

OS is win7-64 SP1

share|improve this question

I am seeing this problem as well. The following option seems to be the one that triggers the behavior:

Text Editor | C/C++ | Formatting | Automatic Indentation On Tab

If the above setting is True, the tab key will 'fix' the entire line so that it's indented according to how the IDE believes it should be indented (no matter where the cursor is on the line).

Changing the setting to False makes the tab key work as I expect it to. I don't know how this setting got set to True on my machine.

VS 2012 also has this setting, and it works the same way.

share|improve this answer
I also saw this behavior today for the first time, after I installed "Update for Visual Studio 2013 Update 1". It was set to true out of nowhere. – Ray Koopa Mar 12 '14 at 17:08
I had this as well, completely out of the blue. – PAK-9 Oct 9 '14 at 15:34
Same problem and solution in VS2013. But never saw it in VS2010. – Doug Null Feb 28 '15 at 0:28
Thanks! Solved for my case. – sergiol Jan 19 at 17:43
up vote 0 down vote accepted

I decided to brute-force fix the issue by going into Options/Environment/Keyboard and bind the [Tab] key with the Edit.InsertTab command for the Text Editor feature. See screenshot below:

Keyboard Options

That seems to have fixed my problem.


share|improve this answer

As a workaround, try pressing Alt-009 (press and hold Alt, then press 009 on a numeric keypad, then release Alt). That should generate a tab character. (The "alt-numbers" function doesn't work using the numbers across the top of the keyboard - you must use a keypad.)

You might need to submit a bug report to Microsoft.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .