Skip to content

How to use Ctrl-h to delete a character, just like the default behavior in the shell. #1284

Answered by ibhagwan
gengdz asked this question in Q&A
Discussion options

You must be logged in to vote

This didn’t happen in telescope because telescope maps <C-h> on telescope windows overriding the tmux navigator binds, FzfLua’s ctrl-h is a shell mapping and doesn’t exist on the fzf window so tmux navigator takes over, what you can do is map ctrl-h to itself upon fzf window creation, this should solve your issue:

    vim.api.nvim_create_autocmd("FileType", {
      group = vim.api.nvim_create_augroup('FzfCtrlH', { clear = true }),
      pattern = "fzf",
      callback = function(e)
        vim.keymap.set("t", "<C-h>", "<C-h>", { buffer = e.buf, silent = true })
      end,
    })

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@gengdz
Comment options

@gengdz
Comment options

@ibhagwan
Comment options

@ibhagwan
Comment options

Answer selected by gengdz
@ibhagwan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants