Cutting up to, including, line end shortcut

On Emacs, if you type 'C-w' in a line containing text, it cuts the entire line by default, including the end of line character.

Is it possible to set up similar shortcut in Intellij?

In the Emacs bindings, `C-k` is assigned to `Cut up to Line End` but it's annoying because it does not cut the end of line character.

3 comments
Comment actions Permalink

There was a bug fixed in 14, see https://youtrack.jetbrains.com/issue/IDEA-130503 .

If you can reproduce this issue, please submit a new bug at http://youtrack.jetbrains.com/issues/IDEA with more details.

0
Comment actions Permalink

Thanks Serge. I don't think it's the same issue. I've opened https://youtrack.jetbrains.com/issue/IDEA-143406

0
Comment actions Permalink

Thinking further, I think there's a mismatch issue.

`C-k` in IntelliJ Emacs is working same as in Emacs itself, it removes everything except the end of line character.

However, it's more efficient to use kill, C-w for this, since if you do it without selecting a region, it kills the current line, including the end of line character.

So, even if you'd get `C-k` to remove the entire line, even if you include the end of line character, you still wouldn't kill/cut it.

The problem is this: you can't use `C-w` keyboard shortcut to kill the current line, you're kinda forced to use `C-k` which is different, and requires an extra keyboard shortcut to be remembered.

See http://ergoemacs.org/emacs/emacs_delete_whole_line.html for more information.

0

Please sign in to leave a comment.