Emacs: what is the shortcut key to clear buffer?

后端 未结 7 1761
别跟我提以往
别跟我提以往 2021-01-30 12:45

Like, Control-A (select all) followed by delete?

7条回答
  •  梦毁少年i
    2021-01-30 13:21

    Select all in Emacs is:

    C-x h
    

    (technically, that's mark-whole-buffer) and kill-region (to kill the marked region, which is now the entire buffer) is:

    C-w
    

    If you want to delete the region without copying it to the kill-ring, you can use

    M-x delete-region
    

    instead. If you do this alot, you'll want to bind delete-region to a key/key combo.

提交回复
热议问题