On Mi, 24 Jan 2024, Anirudh Singh Bhadauria wrote:

> Problem - Remapping crtl+backspace to delete previous word in insert mode! 
> 
> I am finding it really hard to do this, I have tried many combinations but it 
> just doesn't work.
> (however, I was able to remap just backspace to delete the previoius word, 
> but that's not practical) Therefore, If anybody has a solution, that would be 
> great! 

Are you trying this in a terminal or in the gui. Ctrl-Backspace may not 
universally work.

> 
> Remapping combinations that I tried so far, 
> -- vim.keymap.set("i", "<C-BS>", "<C-W>", { desc = "delete whole word" })
> -- vim.keymap.set("i", "<C-W>", "<C-\\><C-O>dB", { noremap = true, silent = 
> true })
> -- vim.keymap.set("i", "<C-W>", "<C-\\><C-O>db", { noremap = true, silent = 
> true })
> -- vim.api.nvim_set_keymap('i', '<BS>', '<C-\\><C-O>db', { noremap = true, 
> silent = true }) (remaps backspace to delete the previoius word)

This is neovim config. Are you using Neovim?


Thanks,
Christian
-- 
The fact that people are poor or discriminated against doesn't necessarily
endow them with any special qualities of justice, nobility, charity or
compassion.
                -- Saul Alinsky

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/ZbEEhosUk6QC44G%2B%40256bit.org.

Reply via email to