Visual Studio Code 选项卡键不插入选项卡 [英] Visual Studio Code Tab Key does not insert a tab

查看:32
本文介绍了Visual Studio Code 选项卡键不插入选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Visual Studio Code 作为我的代码编辑器.我在 google 上进行了搜索,但没有找到有关我的问题的任何信息.

问题很简单,在编辑器中按 ⇥ Tab 什么也不做.我希望它插入 4 个空格.

有人知道我能做些什么让 ⇥ Tab 像预期的那样工作吗?

解决方案

我不小心为 Tab 键启用了不同的模式.通过按 Cmd+Shift+M(对于 Mac)或 Ctrl+M<修复它/kbd>(适用于 Windows).

来自

I'm using Visual Studio Code as my code editor. I did a search on google but wasn't able to find anything about my issue.

The issue is simple, pressing ⇥ Tab in the editor does nothing. I'm expecting it to insert 4 spaces.

Anyone know what I can do to get ⇥ Tab working like expected?

解决方案

I had accidentally enabled a different mode for the tab key. Fixed it by pressing Cmd+Shift+M (for Mac), or Ctrl+M (for Windows).

From the Visual Studio Code Keybinding docs:

| Key      | Command                                 | Command id                       |
| Ctrl + M | Toggle Use of Tab Key for Setting Focus | editor.action.toggleTabFocusMode |

The current tab control mode should also show up in the status bar:

这篇关于Visual Studio Code 选项卡键不插入选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆