visual-studio-code

Prevent Visual Studio Code to use auto-complete on Plain Text


Is there a way to stop Visual Studio Code to autocomplete words, or to stop inserting snippets when working on a "PlainText" document?

I love VSC, but I use a lot of plain-text to take notes and so on. I don't want VSC to turn a 'sentence' like "I was" into:

I <i class="fas fa-car-wash    "></i>

just because I pressed [Enter] after the word 'was'.

I can kill the autocomplete in total, but I like it in code files. I just don't want it when the type is set to plaintext.


Solution

  • Look at language-specific settings. See https://code.visualstudio.com/docs/getstarted/settings#_language-specific-editor-settings

    "[plaintext]": {
      "editor.suggest.showSnippets": false,
      "editor.suggest.showWords": false,
      "editor.acceptSuggestionOnCommitCharacter": false,
      "editor.acceptSuggestionOnEnter": "off"
    },
    

    To quickly fix, open a text file in vscode, click on "Plain Text" in the bottom right, then click "Configure 'Plain Text' language based settings..." in the menu that appears. It'll open a .json file in another tab and you can edit the settings there. (from @JustasidequestNPC comment)