skip to Main Content

I’m new to emacs, how can I highlight all text and copy on emacs?
enter image description here

2

Answers


    • C-xh runs the command mark-whole-buffer (select all)
    • M-w runs the command kill-ring-save (copy)

    As with many programs, you can find both "Select All" and "Copy" in the Edit menu — where you can also see the aforementioned key bindings being advertised.

    Login or Signup to reply.
  1. As phils said, you can find it in the Edit menu, with the main keyboard shortcut C-x h.

    Furthermore, you can see ALL the key bindings by typing ctrl-h k and then clicking menu Edit > Select All, leading emacs to open an *Help* buffer containing:

    <menu-bar> <edit> <mark-whole-buffer> runs the command mark-whole-buffer (found in global-map)
    
    It is bound to s-a, C-x h, <menu-bar> <edit> <mark-whole-buffer>.
    

    You may notice the key binding s-a which means super-a (thanks phils) and, on the mac, refers to the standard shortcut cmd-a (press and hold the cmd modifier and type the letter a).

    Otherwise, on any emacs, you may also type M-x mark-whole-buffer RET (which can be useful if you want to insert in an emacs-lisp function) or the sequence M-< C-x SPACE M-> (which can be useful if you want to skip the first line of the buffer for example).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search