164

I am trying to display all possible words after putting the cursor in certain place in the code.

The autocomplete (suggestions) list appears when I start writing/typing:

enter image description here

However, I would like to see all suggested words even before typing.

I tried command + space, however it was a system shortcut for Search in macOS:

enter image description here

Any thoughts?

starball
  • 20,030
  • 7
  • 43
  • 238
Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254
  • It's *Ctrl* + space: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf (Also described on the [keybindings page](https://code.visualstudio.com/docs/getstarted/keybindings#_rich-languages-editing)) – UnholySheep Jul 14 '18 at 17:01
  • Related: https://stackoverflow.com/questions/56143239/how-to-trigger-vscode-intellisense-using-keyboard-on-osx/59774240#59774240 – jdhao Jan 16 '20 at 16:43
  • 8
    It's called `trigger suggest`, default to `ctrl + space`, could change in `File -> Preference -> Keyboard shortcuts` – Eric Aug 23 '20 at 20:05
  • docs: https://code.visualstudio.com/docs/editor/intellisense#_intellisense-features – starball Aug 07 '23 at 00:20

7 Answers7

288

In case you are a CJK user using Mac, Ctrl+Space will not work, since it is used to switch IMEs.

There is another keyboard shortcut for triggering suggestions:

  • Option+Esc (Mac)
  • Alt+Esc (Windows)

Also see this post.


VS code version: 1.41.1

informatik01
  • 16,038
  • 10
  • 74
  • 104
jdhao
  • 24,001
  • 18
  • 134
  • 273
  • 14
    Confirmed ! Awesome. I upgraded VS Code to 1.141.1, and `Option + esc` works like a charm. – Abdennour TOUMI Jan 18 '20 at 00:59
  • Do I have to press control + space every time? In my previous system it used to show without pressing. Any idea why it's not working anymore? – Rohan Shenoy Oct 24 '20 at 03:56
  • 1
    Pardon my ignorance, but what is CJK and IMEs ? – andrew Oct 03 '21 at 23:35
  • @andrew [CJK](https://en.wikipedia.org/wiki/CJK_characters) means China, Japan and Korea, which have similar character systems. [IME](https://en.wikipedia.org/wiki/Input_method) stands for input method which is necessary to input CJK characters, contrary to the English language. – jdhao Oct 04 '21 at 06:30
  • Thank you @jdhao for `⌥` + `esc` ! – Milovan Tomašević Oct 08 '21 at 20:27
  • Thank you, I have no words. Upvoted you, of course. It works on Mac Studio, Ventura, M1 Max – George Smith Jun 02 '23 at 14:36
  • 1
    Oops! This did not work for me because `Option-Esc` is tied to "Read selected text out loud" on my macOS. `Fn-Control-Space` and `Command-I` worked. – ADTC Jul 28 '23 at 09:00
112

I solved this problem using fn+control+space.
Hope it helps you.

informatik01
  • 16,038
  • 10
  • 74
  • 104
Alexandre Leite
  • 1,353
  • 1
  • 9
  • 10
64

"change input source" keyboard shortcut should be disabled

To disable it->

  • Go to system preferences -> keyboard -> input sources
  • add a new input source (choose ABC)
  • Go to shortcuts tab (inside of keyboard settings)
  • Click on input sources on the left
  • disable the "select previous input source" shortcut

restart your vs code and now ctrl+space will show quick suggestions.

laxminarayan1998
  • 838
  • 8
  • 13
44

You can use the following alternative keyboard shortcuts:

  • +i (mentioned in the official VS Code documentation for "Trigger suggestion")
  • +esc
  • fn+control+space
Raine Revere
  • 30,985
  • 5
  • 40
  • 52
Mohamed Mahrous
  • 471
  • 4
  • 5
22

The shortcut for the "Trigger Suggest" command is ⌃Space (ctrl+space) — as mentioned in the comments.

Most default shortcuts can be found in the documentation, which will automatically show the correct keybindings for the system you're on. In other words, if you visit the page on a Mac, you'll see Mac keybindings.

Additionally, you can:

  • go to Code > Preferences > Keyboard Shortcuts (on a Mac) and search for keybindings based on the command you want to execute
  • open up "show all commands" (⇧⌘P on a Mac) and search for the command there, allowing you to either view the keybinding for that command, or simply navigate to it directly from the search

Of course you'd have to have some idea of what the command's name might be. And in this case, a search for "suggest" would suffice.

jabacchetta
  • 45,013
  • 9
  • 63
  • 75
  • To add to this response, if the hotkey is set, even if disabled, it will not work. To fix it you have to enable it, remap and disable it back again. – zurfyx Nov 28 '20 at 14:04
15

If you use too many keyboard layouts, maybe the MacOS shortcut might be active. You can disabled ^(Ctrl)+Space shortcuts for MacOS.

  • System Preferences>Keyboard>Shorcuts>Input Sources> Disable Select the previous input source.

You can use next shortcut for change input sources.Ctrl+Alt+Space

Ahmet Özçelik
  • 151
  • 1
  • 3
  • 5
    Great! I was getting language change on CTRL + Space in VS Code, but after disabling the change language shortcut from System Preferences AND restarting the VS Code it started to work as expected. – Ventzy Kunev Jul 03 '20 at 22:16
2

when I was set up 2 keyboards with different layouts, and it turn out it overrides the ^+Space behavior, so this is how fix it:

  • Go to system preferences -> Keyboard -> Keyboard shortcuts enter image description here
  • Click on input sources
  • and disable the "select previous input source" shortcut enter image description here