/rejeep-bindings.el

http://github.com/rejeep/emacs · Emacs Lisp · 55 lines · 51 code · 3 blank · 1 comment · 0 complexity · 8fa41edce511886140ece39a6fee0247 MD5 · raw file

  1. ;;; rejeep-bindings.el --- Set up of key bindings
  2. (defun global-set-keys (bindings)
  3. "Globally set all BINDINGS."
  4. (dolist (binding bindings)
  5. (let ((key (car binding)) (command (cadr binding)))
  6. (global-set-key (read-kbd-macro key) command))))
  7. (global-set-keys
  8. '(("M-g" goto-line)
  9. ("C-x M-w" clipboard-kill-ring-save)
  10. ("M-n" open-line-below)
  11. ("M-p" open-line-above)
  12. ("M-N" drag-stuff-down)
  13. ("M-P" drag-stuff-up)
  14. ("C-a" back-to-indentation-or-beginning-of-line)
  15. ("C-c g" google)
  16. ("C-7" comment-or-uncomment-current-line-or-region)
  17. ("C-o" occur)
  18. ("C-6" linum-mode)
  19. ("C-x g" magit-status)
  20. ("%" match-paren)
  21. ("C-c d" duplicate-current-line-or-region)
  22. ("M-+" text-scale-increase)
  23. ("M-_" text-scale-decrease)
  24. ("C-c n" clean-up-buffer-or-region)
  25. ("C-c s" swap-windows)
  26. ("C-c r" rename-this-buffer-and-file)
  27. ("C-c k" delete-this-buffer-and-file)
  28. ("C-0" join-line-or-lines-in-region)
  29. ("M-z" zap-up-to-char)
  30. ("C-M-p" scroll-down-five)
  31. ("C-M-n" scroll-up-five)
  32. ("M-k" kill-this-buffer)
  33. ("M-o" other-window)
  34. ("C-c SPC" ace-jump-mode)
  35. ("C-=" er/expand-region)
  36. ("M-1" delete-other-windows)
  37. ("M-2" split-window-below)
  38. ("M-3" split-window-right)
  39. ("M-0" delete-window)
  40. ("C-M-h" backward-kill-word)
  41. ("M-x" smex)
  42. ("C-x C-c"
  43. (lambda ()
  44. (interactive)
  45. (if (y-or-n-p "Quit Emacs? ")
  46. (save-buffers-kill-emacs))))
  47. ("C-8"
  48. (lambda ()
  49. (interactive)
  50. (find-file
  51. (expand-file-name "init.el" user-emacs-directory))))))
  52. (provide 'rejeep-bindings)