在VS代码中键入Unicode符号

问题描述 投票:3回答:1

我在Visual Studio代码编辑器中输入Ω符号(U + 03A9)时遇到问题。

在我的Mac上,我通常可以使用选项+ z键入它,但它似乎不适用于Code。

许多其他组合似乎工作正常(例如,≈选项+ x输入正确)。

我想知道VS Code是否正在拦截其他键盘快捷键的选项+ z。我搜索了一个键盘快捷键列表,但没有找到任何相关的。

macos unicode visual-studio-code
1个回答
3
投票

⌥Z必然会切换自动换行。

您可以使用⌥Z切换VS Code会话的自动换行。重新启动VS Code将获取持久化的editor.wrappingColumn值。

https://code.visualstudio.com/docs/editor/codebasics#_common-questions

Default Keyboard Shortcuts它显示为:

{ 
  "key": "alt+z",
  "command": "editor.action.toggleWordWrap",
  "when": "editorTextFocus"
}

要删除特定的键绑定,只需将-添加到command,该规则将是删除规则。

https://code.visualstudio.com/docs/customization/keybindings#_removing-a-specific-key-binding-rule

您的keybindings.json文件应包含以下内容:

{
  "key": "alt+z",
  "command": "-editor.action.toggleWordWrap",
  "when": "editorTextFocus"
}

我已经确认这适用于Mac的VSCode。

© www.soinside.com 2019 - 2024. All rights reserved.