vim:keys: Map real <C-BS> to delete one word

Map <C-BS> (i.e. Ctrl-Backspace) to delete one word in insert mode & co.
as it is properly recognized in some terminals implementing [fixterm][1]
(e.g. kitty and patched st).

Keep the <C-H> mapping for other terminals but reuse the <C-BS> mapping.

[1]: http://www.leonerd.org.uk/hacks/fixterms/
This commit is contained in:
2023-02-15 14:30:52 +01:00
parent a05d99df95
commit b7dcc1f79c

View File

@@ -33,7 +33,8 @@ if (has('clipboard'))
endif
" Ctrl-Backspace should delete words in insert mode and on command-line.
noremap! <C-H> <C-W>
noremap! <C-BS> <C-W>
map! <C-H> <C-BS>
" Correct word with best/first suggestion.
noremap <leader>c 1z=