正在使用的vscode tab忽然不能缩进,可能是因为自己安装了某些插件,导致tab键功能被修改。
在 File-->Preferences-->Key board shortcuts 页面中点击打开keybindings.json文件,注释掉下面关于Tab键的命令
// Place your key bindings in this file to overwrite the defaults
//[
// {
// "key": "tab",
// "command": "-jumpToNextSnippetPlaceholder",
// "when": "editorTextFocus && hasNextTabstop && inSnippetMode"
// },
// {
// "key": "tab",
// "command": "-editor.emmet.action.expandAbbreviation",
// "when": "config.emmet.triggerExpansionOnTab && editorTextFocus && !editorReadonly && !editorTabMovesFocus"
// },
// {
// "key": "tab",
// "command": "-insertSnippet",
// "when": "editorTextFocus && hasSnippetCompletions && !editorTabMovesFocus && !inSnippetMode"
// },
// {
// "key": "tab",
// "command": "-acceptSelectedSuggestion",
// "when": "suggestWidgetVisible && textInputFocus"
// },
// {
// "key": "tab",
// "command": "-tab",
// "when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus"
// }
// ]
同时在 File-->Preferences-->settings 中取消勾选这一项
image.png