Visual Studio Code 使用vim时 emmet 会出问题,解决配置如下

能正常使用vim的配置如下

// Place your settings in this file to overwrite the default settings
{
  // Settings
  // "git.path": "d:\\Program Files\\Git\\cmd\\git.exe",
  "editor.tabCompletion": "off",
  "emmet.triggerExpansionOnTab": true,
  "emmet.includeLanguages": {
    "vue-html": "html",
    "vue": "html"
  },
  "explorer.confirmDelete": false,
  "editor.quickSuggestions": {
    "other": true,
    "comments": false,
    "strings": true
  }, // ;. 自动补全
  // "editor.suggestSelection": "first",
  "explorer.incrementalNaming": "smart",
  // "workbench.editor.enablePreview": false,
  "typescript.updateImportsOnFileMove.enabled": "always",
  "javascript.updateImportsOnFileMove.enabled": "always",
  "terminal.integrated.rightClickBehavior": "paste",
  // "http.proxy": "http://proxy2.dq.petrochina:8080",
  // "http.proxyAuthorization": null,
  "editor.formatOnSaveMode": "modifications",

  // Editor - Display
  "editor.fontFamily": "Fira Code",
  "editor.fontLigatures": true,
  "editor.renderWhitespace": "none",
  "editor.find.autoFindInSelection": "multiline",
  // "editor.defaultFormatter": "esbenp.prettier-vscode",
  "tabnine.experimentalAutoImports": true,
  "editor.tabSize": 2,
  "editor.formatOnPaste": true,
  // "editor.formatOnSave": true,
  "editor.formatOnType": true,
  // "editor.snippetSuggestions": "top",
  "editor.suggest.showStatusBar": true,
  "terminal.integrated.allowMnemonics": true,
  "editor.linkedEditing": true,

  // prettier
  "prettier.printWidth": 350,
  "prettier.arrowParens": "avoid",
  "editor.defaultFormatter": "esbenp.prettier-vscode",

  // vim
  "vim.easymotion": true, // #leader leader w/f/e/b(word, end ,back), 启动
  "vim.incsearch": true,
  "vim.useSystemClipboard": true,
  "vim.useCtrlKeys": true,
  "vim.hlsearch": true,
  "vim.sneak": true,
  "vim.insertModeKeyBindings": [{ "before": ["j", "j"], "after": ["<Esc>"] }],
  "vim.normalModeKeyBindingsNonRecursive": [
    { "before": ["<leader>", "d"], "after": ["d", "d"] },
    { "before": ["E"], "after": ["g", "T"] },
    { "before": ["R"], "after": ["g", "t"] },
    { "before": ["<C-n>"], "commands": [":nohl"] }
  ],
  "vim.leader": "<space>",
  "vim.handleKeys": {
    "<C-a>": false,
    "<C-n>": false,
    "Home": false,
    "End": false,
    "<C-c>": false,
    "<C-d>": false,
    "<C-v>": false,
    "<C-h>": false,
    "<C-w>": false,
    "<C-x>": false,
    "<C-f>": false
  },
  "[dart]": {
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
    "editor.rulers": [80],
    "editor.selectionHighlight": false,
    "editor.suggest.snippetsPreventQuickSuggestions": false,
    "editor.suggestSelection": "first",
    "editor.tabCompletion": "onlySnippets",
    "editor.wordBasedSuggestions": false
  },
  "liveServer.settings.useBrowserPreview": true,
  "liveServer.settings.donotVerifyTags": true,
  "git.enableSmartCommit": true,
  "editor.acceptSuggestionOnEnter": "smart",
  // "editor.acceptSuggestionOnEnter": false,

  // "prettier.requirePragma": true,

  // 使用单引号格式化
  // "typescript.tsdk": "./node_modules/typescript/lib",
  // "typescript.tsdk":  "d:\\wgf\\AppData\\Roaming\\npm\\node_modules\\typescript\\lib",
}

不能正确使用vim的配置

// Place your settings in this file to overwrite the default settings
{
  "emmet.triggerExpansionOnTab": true,
  "emmet.includeLanguages": {
    "vue-html": "html",
    "vue": "html"
  },
  "explorer.confirmDelete": false,
  "editor.quickSuggestions": {
    "other": true,
    "comments": false,
    "strings": true
  }, // ;. 自动补全
  // "editor.suggestSelection": "first",
  "explorer.incrementalNaming": "smart",
  // "workbench.editor.enablePreview": false,
  "typescript.updateImportsOnFileMove.enabled": "always",
  "javascript.updateImportsOnFileMove.enabled": "always",
  "terminal.integrated.rightClickBehavior": "paste",
  // "http.proxy": "http://proxy2.dq.petrochina:8080",
  // "http.proxyAuthorization": null,
  "editor.formatOnSaveMode": "modifications",

  // Editor - Display
  "editor.fontFamily": "Fira Code",
  "editor.fontLigatures": true,
  "editor.renderWhitespace": "none",
  "editor.find.autoFindInSelection": "multiline",
  // "editor.defaultFormatter": "esbenp.prettier-vscode",
  "tabnine.experimentalAutoImports": true,
  "editor.tabSize": 2,
  "editor.formatOnPaste": true,
  // "editor.formatOnSave": true,
  "editor.formatOnType": true,
  // "editor.snippetSuggestions": "top",
  "editor.suggest.showStatusBar": true,
  "terminal.integrated.allowMnemonics": true,
  "editor.linkedEditing": true,

  // prettier
  "prettier.printWidth": 350,
  "prettier.arrowParens": "avoid",
  "editor.defaultFormatter": "esbenp.prettier-vscode",

  // vim
  "vim.easymotion": true, // #leader leader w/f/e/b(word, end ,back), 启动
  "vim.incsearch": true,
  "vim.useSystemClipboard": true,
  "vim.useCtrlKeys": true,
  "vim.hlsearch": true,
  "vim.sneak": true,
  "vim.insertModeKeyBindings": [{ "before": ["j", "j"], "after": ["<Esc>"] }],
  "vim.normalModeKeyBindingsNonRecursive": [
    { "before": ["<leader>", "d"], "after": ["d", "d"] },
    { "before": ["E"], "after": ["g", "T"] },
    { "before": ["R"], "after": ["g", "t"] },
    { "before": ["<C-n>"], "commands": [":nohl"] }
  ],
  "vim.leader": "<space>",
  "vim.handleKeys": {
    "<C-a>": false,
    "<C-n>": false,
    "Home": false,
    "End": false,
    "<C-c>": false,
    "<C-d>": false,
    "<C-v>": false,
    "<C-h>": false,
    "<C-w>": false,
    "<C-x>": false,
    "<C-f>": false
  },
  "[dart]": {
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
    "editor.rulers": [80],
    "editor.selectionHighlight": false,
    "editor.suggest.snippetsPreventQuickSuggestions": false,
    "editor.suggestSelection": "first",
    "editor.tabCompletion": "onlySnippets",
    "editor.wordBasedSuggestions": false
  },
  "liveServer.settings.useBrowserPreview": true,
  "liveServer.settings.donotVerifyTags": true,
  "git.enableSmartCommit": true,
  "editor.acceptSuggestionOnEnter": "smart",
  "editor.suggestOnTriggerCharacters": true,
  // "editor.acceptSuggestionOnEnter": false,

  // "prettier.requirePragma": true,

  // 使用单引号格式化
  // "typescript.tsdk": "./node_modules/typescript/lib",
  // "typescript.tsdk":  "d:\\wgf\\AppData\\Roaming\\npm\\node_modules\\typescript\\lib",
  "emmet.showAbbreviationSuggestions": true,
  "emmet.showExpandedAbbreviation": "never",
  "editor.inlineSuggest.enabled": true,
  "[html]": {
    "editor.defaultFormatter": "vscode.html-language-features"
  }
}
posted @ 2021-07-06 20:37  wgf4242  阅读(154)  评论(0编辑  收藏  举报