This is another short Emacs tip that’s really a note to myself. The other day, I found myself in the middle of a line and needed to delete everything back to the beginning-of-line. I was sure there was some way to do that but I didn’t know what it was so I just sat on the 【Delete】 key until I reached the beginning of the line.
For the record, the correct way to do that is 【Ctrl+0 Ctrl+k】. That has a certain tractive logic since 0
suggests the beginning-of-line (at least to those of us with vi
experience) and, of course, 【Ctrl+k】 means kill the rest of the line. It also has the advantage that it’s easy to type.