Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Typing Unicode Symbols in VS Code

I'm having trouble typing the Ω symbol (U+03A9) in the Visual Studio Code editor.

On my Mac, I can usually type this with option + z but it doesn't seem to work in Code.

Many other combinations seem to work just fine (for example, ≈ option+x inputs correctly).

I'm wondering if VS Code is intercepting option + z for some other keyboard shortcut. I searched for a list of keyboard shortcuts but didn't find anything relevant.

like image 552
zmb Avatar asked Jul 26 '16 19:07

zmb


1 Answers

⌥Z is bound to toggle word wrap.

You can toggle word wrap for the VS Code session with ⌥Z. Restarting VS Code will pick up the persisted editor.wrappingColumn value.

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

In the Default Keyboard Shortcuts it shows up as:

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

To remove a specific key binding, simply add a - to the command and the rule will be a removal rule.

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

Your keybindings.json file should include the following:

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

I have confirmed that this is working on VSCode for Mac.

like image 196
coderfin Avatar answered Oct 27 '22 00:10

coderfin