Emacs: Setup Standard Copy Cut Paste Keys

By Xah Lee. Date: . Last updated: .

standard keyboard shortcuts for Copy and Paste

To have standard keys for copy cut paste , turn on CUA mode.

Alt+x cua-mode to toggle it on/off.

emacs cua mode menu 2021-07-19
emacs cua mode menu

cua-mode activates the following keyboard shortcuts:

To have cua-mode always on, put this in your Emacs Init File:

;; make {copy, cut, paste, undo} have {C-c, C-x, C-v, C-z} keys
(cua-mode 1)

standard keyboard shortcuts for {Open, Close, Save, Save As, Select All, etc}

Put this in your Emacs Init File:

(progn
 ;; make emacs use standard keys

  ;; Select All. was move-beginning-of-line
  (global-set-key (kbd "C-a") 'mark-whole-buffer-buffer)

  ;; Find. was forward-char
  (global-set-key (kbd "C-f") 'isearch-forward)

  ;; New. was next-line
  (global-set-key (kbd "C-n") 'xah-new-empty-buffer)

  ;; New Window. was nil
  (global-set-key (kbd "C-S-n") 'make-frame-command)

  ;; Open. was open-line
  (global-set-key (kbd "C-o") 'ido-find-file)

  ;; Save. was isearch-forward
  (global-set-key (kbd "C-s") 'save-buffer)

  ;; Save As. was nil
  (global-set-key (kbd "C-S-s") 'write-file)

  ;; Paste. was scroll-up-command
  (global-set-key (kbd "C-v") 'yank)

  ;; Close. was kill-region
  (global-set-key (kbd "C-w") 'kill-buffer)

  ;; Redo. was yank
  (global-set-key (kbd "C-y") 'redo)

  ;; Undo. was suspend-frame
  (global-set-key (kbd "C-z") 'undo)
  ;;
  )

For the command xah-new-empty-buffer, get it at Emacs: New Empty Buffer.

For the command redo, install redo mode. [see Emacs: Undo/Redo Saga]

Note: The customization above don't always work, because some Major Mode or Minor Mode override global keys, and also you lost some default emacs cursor movement keys.

A robust solution is to install the package ergoemacs-mode at https://ergoemacs.github.io/ or xah-fly-keys. [see Emacs: Xah Fly Keys]

Customize Emacs Keys

For detail, see Emacs Keys


Emacs Init

Init Basics

Keys

Font

Text Editing

Completion

File

Restore Things

Backup/AutoSave

Line

Appearance

Misc

Advanced Init Tips

packages

ErgoEmacs mascot-s276x226
Buy Xah Emacs Tutorial