skip to Main Content

When Intellisense is enabled in Visual Studio Code, VS Code will continually produce pop-up windows as you type with autocomplete suggestions.

The user can then select one of these by pressing tab, enter, etc.

The problem with this is twofold:

  • The popup window obscures code behind it. This is a problem if you are copying code from the lines which happen to be obscured, or you just need to see those lines of code for any reason.
  • The popup window steals keystrokes, such as arrow key navigation movements and, obviously, pressing Enter.

The second of these issues can be addressed by re-assigning the key bindings so that, for example, CTRL+UDLR is used instead of UDLR arrow keys.

I don’t know how to resolve the first problem.

I do not want to disable Intellisense completely, as I then loose some useful features, such as being able to look up where classes/types are defined from the Right Click menu.

Since I am working on a large codebase, this feature is pretty much non-optional.

Is there a way to prevent the popup from showing automatically. In an ideal world, I would like to be able to assign a keyboard shortcut to trigger the Intellisense popup to load, but I don’t know if that is possible?

In short

  • How do I stop the Intellisense popup from showing without disabling Intellisense
  • Can I assign a keyboard shortcut to trigger the popup to load if I want to see the autocomplete suggestions at a particular time?

Note: When I say Intellisense I mean the information that the C++ Extension Pack provides. It might be called something different, I know it as Intellisense from using Visual Studio back in the day.

2

Answers


  1. Chosen as BEST ANSWER

    Today I have half an answer after accidentally discovering this keyboard shortcut: CTRL + I

    It seems that the default mapping for Trigger Suggest is what I was looking for, and answers part of this question.

    I still don't know how to stop the popup raising itself by default. If I can get that to stop happening, then CTRL + I can be used to trigger the suggestions box to be shown.

    VS Code Suggestion Keyboard Shortcut


  2. You could specify super long delay in settings like this
    "editor.quickSuggestionsDelay": 60000 (it’s in milliseconds so it will automatically show only after a minute, but still can be triggered with shortcut), here are the docs.

    I believe there was also a setting to set a number of needed characters after which it will trigger suggestions but i can’t find it right now.

    To trigger suggestion with shortcut find Trigger Suggest in shortcut list (open Command Pallet and search for Keyboard Shortcuts), by default it’s CTRL+Space

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search