31

If I place my cursor inside a multi-line comment:

/*
 * place cursor after the asterisk and before the word 'place'
 */
if (x == 0) 
{
    // some code
}

... and hit tab, Visual Studio doesn't add whitespace as usual. Instead, it highlights the entire comment (all three lines, in the example). If I hit tab again, it will select and highlight the next statement or block of statements. In my example, it highlights the entire if.

How do I fix this and make Visual Studio tab things over? I want tab to behave like a tab.

I'm using Visual Studio 2013 Ultimate with Resharper 9. It started doing this yesterday, and I have no idea why.

1 Answers1

70

Figured it out. It wasn't in VS' settings! Somehow Resharper's configuration was changed. In Resharper's settings:

Environment > Editor > Editor Behavior

Uncheck the box labeled "Structural Navigation". Click "Save".

  • 17
    Why would anybody want "tab" to turn into a select/highlight block operation? Furthermore, what are you *losing* by unchecking Structural Navigation? Surely it's not a synonym for "toggle ridiculous tab behavior inside comment blocks". – Rick O'Shea Feb 02 '17 at 16:22
  • 3
    I have no idea, but I feel the same way. Of all the features my IDE has with Resharper, this one appears to be the most useless. –  Feb 02 '17 at 16:26
  • 1
    It's so annoying, they allow you to disable it when: caret is at start of line, end of line, in comment, or code is selected... so what's left?! See [ReSharper help](https://www.jetbrains.com/help/resharper/2016.3/Navigation_and_Search_Structural_Navigation.html). @Rick O'Shea – Nigel Touch Mar 09 '17 at 21:01
  • This happened magically to me. There must be a hot key to enable/disable it and it was enabled accidentally. Very annoying. – rollsch Aug 11 '17 at 02:45
  • 2
    ReSharper, you can do whatever with at least one extra modifier key (Ctrl, Alt, even Shift). Just leave plain tab with its own func. – Devs love ZenUML Oct 10 '17 at 05:33
  • 2
    Annoying "feature". Thanks. – Margus Sep 30 '18 at 20:46
  • 5
    This happened to me again... 2 years later and found my old comment. – rollsch Jun 17 '19 at 07:33
  • I've had this mis-feature turned off for years and the latest Resharper update just turned it back on again. Ugh. – stricq Nov 09 '22 at 16:23