1

On deleting a line in Emacs using C-k, Emacs removes the line contents but it leaves a blank newline character. To remove this, I again press C-k.

How can I delete the complete line with no traces left behind in one shot?

4

From documentation:

kill-whole-line is an interactive compiled Lisp function.

It is bound to <C-S-backspace>.

(kill-whole-line &optional ARG)

Kill current line. With prefix ARG, kill that many lines starting from the current line. If ARG is negative, kill backward. Also kill the preceding newline. (This is meant to make C-x z work well with negative arguments.) If ARG is zero, kill current line but exclude the trailing newline.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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