Skip to content

Instantly share code, notes, and snippets.

@sshine
Created November 24, 2012 01:58
Show Gist options
  • Save sshine/4138035 to your computer and use it in GitHub Desktop.
Save sshine/4138035 to your computer and use it in GitHub Desktop.
Emacs bindings
(defun kb (k) (read-kbd-macro k))
(dolist (pair
'(("C-z" undo)
("C-k" kill-whole-line)
("M-c" comment-region)
("M-u" uncomment-region)
("C-<return>" mark-paragraph)
("C-n" dabbrev-expand)
("C-g" goto-line)
("C-+" text-scale-increase)
("C--" text-scale-decrease)
("C-x <up>" select-previous-window)
("C-x <down>" select-next-window)
("C-S-c C-S-c" mc/edit-lines)
("C->" mc/mark-next-like-this)
("C-<" mc/mark-previous-like-this)
("C-S-c C-S-s" mc/mark-all-like-this)
))
(global-set-key (kb (car pair)) (cadr pair)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment