Skip to content

Allow numbers as second input event #8113

@areux

Description

@areux

I'm a long time emacs user and I'm used to split window with C-x 3 (vertical) and C-x 2 (horizontal).
Right now this config doesn't work:

"C-x" = { "3" = "vsplit", "2" = "hsplit", "0" = "wclose" }

this is my setup for neovim:

local map = function(mode, key, cmd, opts)
  vim.api.nvim_set_keymap(mode, key, cmd, opts or { noremap = true, silent = true })
end
map('n', '<C-x>0', '<C-w>q')
map('n', '<C-x>2', '<C-w>s')
map('n', '<C-x>3', '<C-w>v')

I know numbers are reserved for movements but being inspired by vim, I can't see why helix shouldn't be able to do the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-keymapArea: Keymap and keybindingsC-enhancementCategory: Improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions