2008-12-14

copying and pasting in emacs

I've used emacs for almost 15 years, and it's strange, but when I wanted to copy and paste, I've always cut the text first, then pasted it back, then finally pasted it where I wanted it to be.

It's only recently that I noticed that M-w copied the text to the clipboard. Silly, I know.

Here's some commands I use regularly when editing text:

key bindingdescriptionemacs command
C-spaceStart selection of region. Everything selected is automatically copied to clipboard.set-mark-command
C-p, C-M-pUp one line, one block back, respectivelyprevious-line, backward-list
C-n, C-M-nDown one line, one block forward, respectivelynext-line, forward-list
C-f, M-fForward one letter, forward one word, respectivelyforward-char, forward-word
C-b, M-bBack one letter, back one word, respectivelybackward-char, backward-word
C-wCut region to clipboardkill-region
M-wCopy region to clipboardkill-ring-save
C-yPaste most recent text from clipboardyank
M-yCycle through clipboard history (start with one C-y, then follow with multiple M-y)yank-pop

0 comments:

Post a Comment