yaxu / feedforward

GNU General Public License v3.0
129 stars 10 forks source link

kill whole line shortcut #24

Open ndr-brt opened 3 years ago

ndr-brt commented 3 years ago

Would be useful to define a shortcut to kill all the line where the cursor is. At the moment there's the kill-line (C-k), but it requires to many digits to accomplish the task.

The keybind could be C-S-k.

yaxu commented 3 years ago

Hmm but C-k only requires two keys whereas C-S-k requires three?

ndr-brt commented 3 years ago

Yes, but C-k kills a line from the cursor to the end of the line (\n excluded), I wanted a command like the dd in VI, where the current line is deleted completely (\n included)

I did some researches/explorations about that and I learned that:

Enabling logs, I noticed that the C-S-Backspace combination generates an EventCharacter '\b', that's generated also with C-Backspace, so maybe that could be our shortcut to remove a line.

ndr-brt commented 3 years ago

Other information, C-S-Backspace, C-Backspace and C-h launch the same event (ord == 8)

yaxu commented 3 years ago

FWIW, I use ctrl-a ctrl-k for this