Search code examples
c#visual-studio-codenamespaceskeyboard-shortcuts

How can I quickly add a missing namespace in VS Code?


I'm trying my best to start really using VS Code (I come from Visual Studio environment). In VS I can just right click a red squiggle and add the namespace. In VS Code it can be done quickly but I can't remember how. I think it had something to do with the single quote key maybe? I do have OmniSharp enabled and running if that matters.

Is there somewhere that would tell me these shortcuts? Like a cheat sheet for VS Code? I don't see it on the one shown below... enter image description here


Solution

  • Just use CTRL+. on the word with the red underline. No need to install other extensions.