简体   繁体   中英

VSCode doesn't autocomplete when text is highlighted after another autocompletion

When editing text on visual studio code, when I use autocomplete for something (like in the picture) https://i.stack.imgur.com/0WKnm.png

It highlights my text (while typing) and autocomplete stops working

https://i.stack.imgur.com/HjK6T.png

Same goes when I autocomplete an if statement

https://i.stack.imgur.com/WPNVX.png

Is there any way to disable that highlight, or make it autocomplete even with the highlight?

Add this in your settings.json file, it'll prevent this behaviour:

"editor.suggest.snippetsPreventQuickSuggestions": true,

If you wanted autocomplete dropdown while code is highlighted (for example: After you performed an autocomplete and VS Code auto highlights for you):

"editor.suggest.snippetsPreventQuickSuggestions": false,

^^^ in your settings.json ^^^

Example action: Editing a html doc: you typed 'clas...' in a div

<div clas..>
     Something...
<div>

It should autocomplete to

<div class="HIGHLIGHTEDTXT">
     Something...
<div>

with HIGHLIGHTEDTXT , you can type any things and the autocomplete dropdown will be shown.

PS

The autocomplete dropdown will not appear if the settings is set to TRUE when a text is highlighted.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM