kickstart.nvim icon indicating copy to clipboard operation
kickstart.nvim copied to clipboard

<C-h> in insert mode does not delete previous character

Open m-gris opened this issue 1 year ago • 2 comments

Describe the bug

<C-h> in insert mode does not trigger <BS> / does not delete previous character

To Reproduce

  1. Enter insert mode
  2. write some text
  3. press <C-h>
  4. nothing happens...

Desktop

  • OS: macOS 13.5.6
  • Terminal: kitty

Neovim Version

:version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/Cellar/neovim/0.9.5/share/nvim"

m-gris avatar Mar 18 '24 00:03 m-gris

Just reproduced this on my Mac.

Also validated that the problem lies with kickstart because starting nvim --clean and Ctrl-h does indeed act as backspace as one might expect.

Interestingly, hitting Backspace performs the expected behavior of deleting the last character typed.

feoh avatar Mar 18 '24 01:03 feoh

If you type: :map

You'll see it's already bound:

s  <C-H>       * <Lua 94: ~/.local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/keymap.lua:127>
                 cmp.utils.keymap.set_map
n  <C-H>       * <C-W><C-H>
                 Move focus to the left window

feoh avatar Mar 18 '24 02:03 feoh

Not a bug. Please see the remap in url below.

You'll see it's already bound:

@feoh it is bound in here: https://github.com/nvim-lua/kickstart.nvim/blob/773e482d4b40cec4095e4b60fbd753cb69b3f51b/init.lua#L714-L718

You can safely delete those 5 lines to make C-h work normally. That's what I did.

btw, we can just search with ctrl-f in a browser:

c-h

gauffer avatar Mar 19 '24 17:03 gauffer

This has a work-around posted now. Closing.

feoh avatar Mar 19 '24 17:03 feoh