VSpaceCode / VSpaceCode

Spacemacs like keybindings for Visual Studio Code

Home Page:https://vspacecode.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use `C-g` to replace `Esc`?

YarenZhang opened this issue · comments

Sorry for asking trivial questions. But how do I use C-g like in Emacs? I searched through the internet yet do not find an answer to this. Many thanks~

Same question here

The only two ways that I can think of

  1. Set that up in an external keyboard remapping like karabiner-elements for example
  2. Remap all the shortcuts in vscode that mapped to esc to C-g. See https://code.visualstudio.com/docs/getstarted/keybindings

Closing this for now as this is mostly not related to this extension

commented

I got the functionality working by copying the keybinds from vscode-emacs-friendly. Or you could just install the add-on for a more emacs-like experience.

  {
      "key": "ctrl+g",
      "command": "closeFindWidget",
      "when": "editorFocus && findWidgetVisible"
  },
  {
      "key": "ctrl+g",
      "command": "closeReferenceSearchEditor",
      "when": "inReferenceSearchEditor && !config.editor.stablePeek"
  },
  {
      "key": "ctrl+g",
      "command": "closeReferenceSearch",
      "when": "referenceSearchVisible && !config.editor.stablePeek"
  },
  {
      "key": "ctrl+g",
      "command": "closeBreakpointWidget",
      "when": "breakpointWidgetVisible && editorFocus"
  },
  {
      "key": "ctrl+g",
      "command": "leaveSnippet",
      "when": "editorTextFocus && inSnippetMode"
  },
  {
      "key": "ctrl+g",
      "command": "closeMarkersNavigation",
      "when": "editorFocus && markersNavigationVisible"
  },
  {
      "key": "ctrl+g",
      "command": "closeParameterHints",
      "when": "editorTextFocus && parameterHintsVisible"
  },
  {
      "key": "ctrl+g",
      "command": "hideSuggestWidget",
      "when": "editorTextFocus && suggestWidgetVisible"
  },
  {
      "key": "ctrl+g",
      "command": "cancelRenameInput",
      "when": "editorFocus && renameInputVisible"
  },
  {
      "key": "ctrl+g",
      "command": "closeAccessibilityHelp",
      "when": "accessibilityHelpWidgetVisible && editorFocus"
  },
  {
      "key": "ctrl+g",
      "command": "closeReplaceInFilesWidget",
      "when": "replaceInputBoxFocus && searchViewletVisible"
  },
  {
      "key": "ctrl+g",
      "command": "workbench.action.closeMessages",
      "when": "globalMessageVisible"
  },
  {
      "key": "ctrl+g",
      "command": "workbench.action.closeQuickOpen",
      "when": "inQuickOpen"
  },

Thanks for providing an update and the tip