mawww / kakoune

mawww's experiment for a better code editor
http://kakoune.org
The Unlicense
9.98k stars 715 forks source link

Allow to delete word in command line (and maybe insert mode) #543

Closed memeplex closed 7 years ago

memeplex commented 8 years ago

It is pretty common when editing in the command line to delete the last type word, i.e. an entire parameter for the current command. Currently there are word movements implemented for the command line but nothing like the usual shell <c-w> (moreover, <c-w> is bound to word movement which I find counterintuitive for a unix lifelong user). I suggest to add <c-backspace> (and maybe <c-delete> for symmetry).

Indeed deleting the last word is a usual requirement in insert mode too, because it's usually faster to retype the entire word than to correct some mispelling. But currently (AFAIK) it's too cumbersome to do than in kak, as it implies going out to normal mode and back, or alternatively pressing <m-;> twice for two one-shot normal commands.

memeplex commented 8 years ago

Btw as I'm unable to find a mailing list or irc channel for kakoune I want to add here that I'm pleased about your good taste for software and ui design (ui in the relevant sense, not fancy screens). You have selected your lego pieces with art and economy. Kudos.

ekie commented 8 years ago

hello, u can solve your need for deleting a word in insert mode with a mapping. Something like :map global insert <c-w> <esc>bdi .

you find the irc channel #kakoune on freenode.

memeplex commented 8 years ago

Thank you very much @ekie. I know I can write mappings, I was suggesting to add a builtin one because IMO it's a very frequent use case.

lenormf commented 8 years ago

The solution is indeed what was proposed by @ekie, this "issue" about shell shortcuts not being implemented in kakoune comes up regularly, you can read an answer to it in #334.

lenormf commented 7 years ago

I think this issue can be closed.

mawww commented 7 years ago

Yeah, its still a more general problem with command line editing, but this specific issue can be closed.