Visual Studio Code에서 자동 완성 토글(영구적으로 꺼지지 않음)

Visual Studio Code에서 자동 완성 토글(영구적으로 꺼지지 않음)

이것이 이 질문에 대한 적절한 포럼이기를 바랍니다...

웹을 검색했지만 아무 소용이 없었습니다. 세부 정보를 찾은 모든 링크에서 자동 완성 기능이 영구적으로 꺼졌습니다. 자동완성을 쉽게 켜고 끌 수 있는 방법이 있나요? 나는에 대한 끊임없는 제안을 찾습니다.모든 것매우 짜증나지만 가끔 도움을 받는 것은 신경쓰지 않습니다. 이 시점에서 내 이스케이프 키가 가장 먼저 마모되는 키가 될 것입니다.

시스템 정보: Linux Mint Uma - XFCE - compiz 및 emerald 포함

deb [arch=amd64,arm64,armhf]의 Visual Studio 코드 1.63.2http://packages.microsoft.com/repos/code안정적인 메인

어떤 제안이 있으십니까?

답변1

내 질문에 답하기 ...

"항상 끄기" 웹사이트 몇 개를 살펴보고 이 웹사이트로 결정했습니다.Our Code World - 자동 완성 비활성화. 원래 질문에서 말했듯이 항상 끄고 싶지 않고 켜고 끌 수 있는 방법을 원합니다. 하지만 GUI 도구를 사용하는 방법을 설명하기보다는 링크에 필요한 JSON 콘텐츠가 표시된다는 사실에 희망을 두었습니다. 결과적으로 설정에서 변경해야 할 몇 가지 사항이 있었지만(VSC가 코드가 작성된 이후로 발전했다는 것은 의심할 여지가 없습니다), 그렇게 훌륭한 시작에서 필요한 것을 해결할 수 있었습니다.

어쨌든 저는 GNU/Linux를 사용하고 있으므로 첫 번째 단계는 "settings.json" 파일을 찾는 것이었습니다. 다음 명령을 실행했는데 놀랍게도 결과가 거의 나오지 않았습니다.

$ locate settings.json

내가 원하는 것은 매우 분명했습니다 ~/.config/Code/User/settings.json . 그래서 먼저 원본 파일의 안전한 복사본을 만들었습니다. 그런 다음 링크에 제공된 지침에 따라 편집했습니다. 그때 VSC가 설정 파일을 적극적으로 모니터링한다는 것을 알았습니다. 거기에서 파일을 자동 완성 기능에서 자동 완성 기능으로 변경하는 몇 가지 스크립트를 작성하는 것은 쉬웠습니다.

이 내용은 진화하는 것으로 보이므로 제가 제시하는 내용이 무기한 유효하지 않을 수도 있습니다. 그러나 아래 내용은 누구나 시작하는 데 도움이 될 것입니다.

~/.config/Code/User/settings.ac_on.json의 내용

{
"http.proxySupport": "fallback",
"http.proxy": "http://10.0.2.2:3128",
"workbench.startupEditor": "none",
    "[vue]": {
    "editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"diffEditor.ignoreTrimWhitespace": false,
"eslint.format.enable": true,
"eslint.codeActionsOnSave.rules": [
    "autoFixOnSave=true"
],
"editor.formatOnSave": true,
"[javascript]": {
    "editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
"files.autoSave": "onFocusChange",
"vetur.completion.scaffoldSnippetSources": {
    "workspace": "",
    "user": "",
    "vetur": ""
},
"workbench.colorTheme": "Solarized Dark",
"debug.javascript.autoAttachFilter": "onlyWithFlag",
"livePreview.portNumber": 8000,
"livePreview.showServerStatusNotifications": false,
"editor.linkedEditing": true,
"editor.minimap.enabled": false,
"vetur.format.scriptInitialIndent": true,
"vetur.format.styleInitialIndent": true,
"vetur.ignoreProjectWarning": true,
"vetur.useWorkspaceDependencies": true,
"vetur.validation.templateProps": true,
"editor.tabSize": 2,
"editor.wrappingIndent": "indent",
"editor.detectIndentation": false
}

~/.config/Code/User/settings.ac_off.json의 내용

{
"http.proxySupport": "fallback",
"http.proxy": "http://10.0.2.2:3128",
"workbench.startupEditor": "none",
    "[vue]": {
    "editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"diffEditor.ignoreTrimWhitespace": false,
"eslint.format.enable": true,
"eslint.codeActionsOnSave.rules": [
    "autoFixOnSave=true"
],
"editor.formatOnSave": true,
"[javascript]": {
    "editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
"files.autoSave": "onFocusChange",
"vetur.completion.scaffoldSnippetSources": {
    "workspace": "",
    "user": "",
    "vetur": ""
},
"workbench.colorTheme": "Solarized Dark",
"debug.javascript.autoAttachFilter": "onlyWithFlag",
"livePreview.portNumber": 8000,
"livePreview.showServerStatusNotifications": false,
"editor.linkedEditing": true,
"editor.minimap.enabled": false,
"vetur.format.scriptInitialIndent": true,
"vetur.format.styleInitialIndent": true,
"vetur.ignoreProjectWarning": true,
"vetur.useWorkspaceDependencies": true,
"vetur.validation.templateProps": true,
"editor.tabSize": 2,
"editor.detectIndentation": false,

  // OPTIONAL WORD WRAPPING
  // Controls if lines should wrap. The lines will wrap at min(editor.wrappingColumn, viewportWidthInColumns).
  "editor.wordWrap": "off",
  
  // Controls the indentation of wrapped lines. Can be one of 'none', 'same' or 'indent'.
  "editor.wrappingIndent": "none",

  // TURN OFF AUTOCOMPLETION
  // Controls if quick suggestions should show up or not while typing
  "editor.quickSuggestions": false,

  // Controls the delay in ms after which quick suggestions will show up
  "editor.quickSuggestionsDelay": 90,

  // Enables parameter hints
  "editor.parameterHints": false,

  // Controls if the editor should automatically close brackets after opening them.
  // Can be one of 'always', 'languageDefined', 'beforeWhitespace', 'never'.
  "editor.autoClosingBrackets": "never",

  // Controls if the editor should automatically format the line after typing
  "editor.formatOnType": false,

  // Controls if suggestions should automatically show up when typing trigger characters
  "editor.suggestOnTriggerCharacters": false,

  // Controls if suggestions should be accepted 'Enter' - in addition to 'Tab'. Helps to avoid ambiguity between inserting new lines or accepting suggestions.
  "editor.acceptSuggestionOnEnter": "off"

}

~/bin/ac_on의 내용(bash 쉘 스크립트)

#!/bin/bash
SOURCE=~/.config/Code/User/settings.ac_on.json
TARGET=~/.config/Code/User/settings.json
cat $SOURCE > $TARGET

~/bin/ac_off의 내용(다른 bash 쉘 스크립트)

#!/bin/bash
SOURCE=~/.config/Code/User/settings.ac_off.json
TARGET=~/.config/Code/User/settings.json
cat $SOURCE > $TARGET

VSC에는 bash 프롬프트가 내장되어 있으며 ~/bin은 내 개인 경로에 있습니다. 결과적으로 자동 완성 전환은 "ac_on" 또는 "ac_off"를 입력하는 것만큼 간단합니다.

관련 정보