Insert raw tab with ⌥-tab

I want to map ⌥-tab to insert a raw tab character in the file being edited.

This will make editing .tsv files a lot easier, or any other file that needs a raw tab.

I see ⌥-tab isn’t taken by anything, how do you do this in vscode/cursor settings?

ok this is straightforward. cmd-shift-p, select “Preferences: open keyboard bindings (JSON)” to open keybindings.json and add:

  {
      "key": "alt+tab",
      "command": "type",
      "args": {
          "text": "\t"
      }
  }

“option”/⌥ is called “alt” in vscode/cursor settings. For Windows and Linux users, alt+tab obviously isn’t a good binding as you use it for the switcher, so you would have to come up with another combo. But on Mac it’s free.

The idea again is to be able to reliably type an actual tab character at any time instead of accepting spam from the tab completion feature.