SiteMap Search ElispArea HowTo Glossary RecentChanges News Problems Suggestions

BackwardKillLine

Last edit

Summary: Refactor page

Changed:

< To join a line with the previous use `M-^' (`delete-indentation'). It deletes the newline character on the previous line. To delete the newline at the end of the current line use `C-u M-^'.

to

> To join a line with the previous use `##M-^##' (`delete-indentation'). It deletes the newline character on the previous line. To delete the newline at the end of the current line use `##C-u M-^##'.


KillingAndYanking a line backwards can be done with ‘C-0 C-k’ or ‘C-u 0 C-k’.

Deleting words backwards with ‘C-DEL’ or ‘M-DEL’ (‘backward-kill-word’) is useful since each kill appends to the kill ring and is available as a single yank. If the point is anywhere in the first sentence, ‘C-x DEL’ (‘backward-kill-sentence’) can also delete to the beginning of the line.

Note, ‘C-M-backspace’ is bound to restarting X Windows or rebooting the system with the Linux kernel, so beware.

If you needed a command specifically for killing backwards, use the following code by EvaluatingExpressions or by adding it to your InitFile:

(defun backward-kill-line (arg)
  "Kill ARG lines backward."
  (interactive "p")
  (kill-line (- 1 arg)))

You may want to bind it to a different key

(global-set-key "\C-cu" 'backward-kill-line) ;; `C-c u'

To join a line with the previous use `M-^’ (‘delete-indentation’). It deletes the newline character on the previous line. To delete the newline at the end of the current line use `C-u M-^’.

See LineCommands


CategoryKeys CategoryEditing