Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some keybindings does not work after exit from insert mode #8989

Open
giovaborgogno opened this issue Apr 11, 2024 · 0 comments
Open

Some keybindings does not work after exit from insert mode #8989

giovaborgogno opened this issue Apr 11, 2024 · 0 comments

Comments

@giovaborgogno
Copy link

Describe the bug
I create some custom key bindings, these work properly, but when I use insert mode and then exit with <Esc> or <"j" "j"> these key bindings do not work anymore

To Reproduce
I've this custom normalkeybindings:

{
      "before": [
        "<leader>",
        "e"
      ],
      "after": [],
      "commands": [
        {
          "command": "workbench.view.explorer"
        }
      ]
    },
    {
      "before": [
        "leader",
        "w"
      ],
      "commands": [
        "workbench.action.files.save",
      ]
    }
  1. Close Side Bar
  2. Check when you use <leader> + e works properly and explorer is opened
  3. Press i to use insert mode
  4. Exit from inner mode <Esc>
  5. Now when you use <leader> + e does not work anymore

Same steps with the another key binding

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
If remapping-related, please attach log output: https://github.com/VSCodeVim/Vim#debugging-remappings.
image

Environment (please complete the following information):

  • Extension (VsCodeVim) version: v1.27.2

  • VSCode version: Version: 1.88.0
    Commit: 5c3e652f63e798a5ac2f31ffd0d863669328dc4c
    Date: 2024-04-03T13:28:09.495Z
    Electron: 28.2.8
    ElectronBuildId: 27744544
    Chromium: 120.0.6099.291
    Node.js: 18.18.2
    V8: 12.0.267.19-electron.0
    OS: Darwin arm64 23.4.0

  • OS: macOS Sonoma 14.4.1

Additional context
I am using a specific profile inside vscode with vim configuration.
my complete settings.json:

{
  "liveServer.settings.donotVerifyTags": true,
  "workbench.startupEditor": "none",
  "liveServer.settings.donotShowInfoMsg": true,
  "diffEditor.ignoreTrimWhitespace": false,
  "kite.showWelcomeNotificationOnStartup": false,
  "cmake.configureOnOpen": true,
  // Editor
  "editor.formatOnSave": true,
  "editor.fontWeight": "normal",
  "editor.fontLigatures": false,
  "editor.scrollbar.vertical": "hidden",
  "editor.scrollbar.horizontal": "hidden",
  "editor.roundedSelection": false,
  "editor.folding": false,
  "editor.minimap.enabled": false,
  "editor.cursorStyle": "block",
  "editor.glyphMargin": false,
  "editor.tokenColorCustomizations": {
    // "variables": "#a6a28c",
    "comments": "#2ea542",
  },
  "diffEditor.renderSideBySide": false,
  "cmake.debugConfig": {},
  "[python]": {
    "editor.formatOnType": true
  },
  "files.associations": {
    "*.js": "javascript",
    "*.json": "json",
    "*.html": "html"
  },
  "solidity.telemetry": true,
  "gitlens.ai.experimental.provider": "openai",
  "gitlens.ai.experimental.openai.model": "gpt-4-1106-preview",
  // Vim setup
  "vim.enableNeovim": false,
  "vim.neovimPath": "/opt/homebrew/bin/nvim",
  "vim.searchHighlightColor": "rgba(150, 255, 255, 0.3)",
  "vim.leader": "<space>",
  "vim.cursorStylePerMode.insert": "block",
  "vim.easymotion": true,
  "vim.incsearch": true,
  "vim.useSystemClipboard": true,
  "vim.useCtrlKeys": true,
  "vim.hlsearch": true,
  "vim.handleKeys": {
    "<C-a>": false,
    "<C-f>": false
  },
  "vim.insertModeKeyBindings": [
    {
      "before": [
        "j",
        "j"
      ],
      "after": [
        "<Esc>"
      ]
    },
  ],
  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": [
        "<leader>",
        "d"
      ],
      "after": [
        "d",
        "d"
      ]
    },
    {
      "before": [
        "<leader>",
        "i"
      ],
      "after": [],
      "commands": [
        {
          "command": "workbench.action.terminal.focus"
        }
      ]
    },
    {
      "before": [
        "<leader>",
        "u"
      ],
      "after": [],
      "commands": [
        {
          "command": "workbench.action.focusActiveEditorGroup"
        }
      ]
    },
    {
      "before": [
        "<leader>",
        "p"
      ],
      "after": [],
      "commands": [
        {
          "command": "workbench.action.quickOpen"
        }
      ]
    },
    {
      "before": [
        "<leader>",
        "o"
      ],
      "after": [],
      "commands": [
        {
          "command": "workbench.action.quickOpen"
        }
      ]
    },
    {
      "before": [
        "<leader>",
        "v"
      ],
      "after": [],
      "commands": [
        {
          "command": "workbench.action.splitEditor"
        }
      ]
    },
    {
      "before": [
        "<leader>",
        "h"
      ],
      "after": [],
      "commands": [
        {
          "command": "workbench.action.focusFirstEditorGroup"
        }
      ]
    },
    {
      "before": [
        "<leader>",
        "l"
      ],
      "after": [],
      "commands": [
        {
          "command": "workbench.action.focusSecondEditorGroup"
        }
      ]
    },
    {
      "before": [
        "<C-n>"
      ],
      "after": [],
      "commands": [
        {
          "command": ":nohl"
        }
      ]
    },
    {
      "before": [
        "<leader>",
        "e"
      ],
      "after": [],
      "commands": [
        {
          "command": "workbench.view.explorer"
        }
      ]
    },
    {
      "before": [
        "leader",
        "w"
      ],
      "commands": [
        "workbench.action.files.save",
      ]
    }
  ],
  "workbench.sideBar.location": "right",
  "workbench.editor.editorActionsLocation": "hidden",
  "editor.renderWhitespace": "none",
  "vim.statusBarColorControl": true,
  "vim.statusBarColors.normal": [
    "#8FBCBB",
    "#434C5E"
  ],
  "vim.statusBarColors.insert": "#BF616A",
  "vim.statusBarColors.visual": "#B48EAD",
  "vim.statusBarColors.visualline": "#B48EAD",
  "vim.statusBarColors.visualblock": "#A3BE8C",
  "vim.statusBarColors.replace": "#D08770",
  "vim.statusBarColors.commandlineinprogress": "#007ACC",
  "vim.statusBarColors.searchinprogressmode": "#007ACC",
  "vim.statusBarColors.easymotionmode": "#007ACC",
  "vim.statusBarColors.easymotioninputmode": "#007ACC",
  "vim.statusBarColors.surroundinputmode": "#007ACC",
  "workbench.colorCustomizations": {
    "statusBar.noFolderBackground": "#B48EAD",
    "statusBar.debuggingBackground": "#B48EAD",
    "statusBar.foreground": "#434C5E",
    "statusBar.debuggingForeground": "#434C5E",
    "statusBar.background": "#B48EAD"
  },
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant