Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

3 Answers 3

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. –  DebugErr Mar 12 at 17:08
    
I had this as well, completely out of the blue. –  PAK-9 Oct 9 at 15:34
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.

Thanks.

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 M$.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.