Is there an option in Visual Studio 2019 to put the cursor on the nearest character or whitespace?

Viewed 215

I am currently working on a C# project and whenever I press the left mouse button, the cursor will go there even if there is no whitespace. This seems to only happen for certain languages for me though.

Here is a screenshot of what I am describing:

Click here to see it

In the screenshot, whitespace is being shown by blue dots. As you can see, even though there is no whitespace at the cursor, it is still there. In Visual Studio Code, however, this does not happen:

In This picture, the cursor goes as far back as possible when I click

I was wondering if there was an option to make it like that in Visual Studio 2019.

1 Answers

Try this:

  • Tools
    • Options
      • Text Editor
        • All Languages
          • General
            • Enable Virtual Space (clear the check box)

Or, you can change it on a language by language basis (by selecting a language rather than All Languages)

I can remember getting that setting set once, it drove me crazy till I finally found the magic setting.

Related