2

I am new to Neovim and its configuration.

I would like to know, first of all, what is your opinion on maintaining the functionality that Ctrl-Delete has outside the editor. In my case, it deletes the word to the left of the cursor. If its in the middle just deletes the characters to its left. Also if its not in a word, deletes all the spaces until it finds one.

Unfortunately I wasn't able to find any solution, nor even close to working.

I am really used to using that so I would like to create a key map for it. The thing is that I cannot make it work. What should be the way to do it?

5
  • 1
    Welcome to Vi and Vim SE. Please tell us what behavior Ctrl+Del has outside of the editor. This may vary depending on your operating system. What do you want to accomplish? What happens instead? What did you try? Please edit your question and tell us.
    – Friedrich
    Commented Sep 4, 2023 at 10:59
  • So better get used to the default way, it would take a day at most. In normal mode it would be <kbd>d</kbd>+<kbd>b</kbd> in the insert mode it would be <kbd>Ctrl</kbd>+<kbd>w</kbd>
    – d.k
    Commented Sep 4, 2023 at 18:08
  • I’m not sure I understand the question. I think it boils down to “how do I map C-Del to have this exact behavior”, but asking for opinions on the behavior is… off-topic or misleading I suppose? Please edit or comment to clarify
    – D. Ben Knoble
    Commented Sep 5, 2023 at 15:47
  • "deletes the word to the left of the cursor" You may want to try db or dB
    – Hoblovski
    Commented Sep 6, 2023 at 7:08
  • Do you have something left open on your question? How can we help you further? Otherwise maybe could you accept an answer using the v button next to the arrow voting buttons? It allows the question to rest :-) Commented Sep 6, 2023 at 20:07

1 Answer 1

2

I would do:

nnoremap <C-Del> dw
inoremap <C-Del> <C-o>dw

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.