Re: Remapping crtl+backspace to delete previous word in insert mode!

Marius Gedminas <[email protected]>
Newsgroups gmane.editors.vim
Message-ID <k3iah7qbfeikqufa6cvep2amtkv3qhjvb3jmgv4uv2e5dt37yz@v7nccc54q34h>
On Wed, Jan 24, 2024 at 04:29:34AM -0800, 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.

I've this mapping for command-line editing mode that works in vim running in
gnome-terminal:

    " Ctrl-Backspace deletes word backwards
    cnoremap        <C-BS>          <C-W>
    " (gnome-terminal sends ^H for ctrl-backspace)
    cmap            <C-H>           <C-BS>

in my .vimrc.  This config also works fine for nvim in gnome-terminal.
I haven't gone out of my way to test whether the same mapping will work
in insert mode, but I don't see any reason why it wouldn't.

HTH,
Marius Gedminas
-- 
I have, however, attempted to stamp out burning thermite (not recommended),
neglected to note that I'd lit the fuse of a homemade grenado (not recommended)
and only noticed I was standing in a cloud of gasoline vapour after I struck a
match (also not recommended).
        -- James Nicoll

-- 
-- 
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/k3iah7qbfeikqufa6cvep2amtkv3qhjvb3jmgv4uv2e5dt37yz%40v7nccc54q34h.
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQSBIa0y8AqAlHSKbNCRV0Rd56bXjwUCZbJFsgAKCRCRV0Rd56bX
j5aBAJ9mzcX2xFVCKGQqxiREhBx+e1MqUgCfe6jJHIkwxQ4/zY1tjsEPFxdK83Q=
=dRKV
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.