Created
April 10, 2014 12:46
-
-
Save danidoni/10378344 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Move M-x to C-x C-m or C-c C-m | |
(global-set-key "\C-x\C-m" 'execute-extended-command) | |
(global-set-key "\C-c\C-m" 'execute-extended-command) | |
;; Remap keys on Mac OS | |
(when (eq 'ns (window-system)) | |
(defun closing-curly-brace-symbol () | |
(interactive) | |
(insert "}")) | |
(defun closing-braket-symbol () | |
(interactive) | |
(insert "]")) | |
(defun at-symbol () | |
(interactive) | |
(insert "@")) | |
(defun tilde-symbol () | |
(interactive) | |
(insert "~")) | |
(defun sharp-symbol () | |
(interactive) | |
(insert "#")) | |
(defun pipe-symbol () | |
(interactive) | |
(insert "|")) | |
(defun slash-symbol () | |
(interactive) | |
(insert "\\")) | |
(global-set-key (kbd "M-ç") 'closing-curly-brace-symbol) | |
(global-set-key (kbd "M-+") 'closing-braket-symbol) | |
(global-set-key (kbd "M-2") 'at-symbol) | |
(global-set-key (kbd "M-ñ") 'tilde-symbol) | |
(global-set-key (kbd "M-3") 'sharp-symbol) | |
(global-set-key (kbd "M-1") 'pipe-symbol) | |
(global-set-key (kbd "M-º") 'slash-symbol)) | |
(setq ns-pop-up-frames nil) | |
;; Insert a debugger statement on cursor | |
(defun insert-debugger () | |
(interactive) | |
(insert "require 'ruby-debug'; debugger; 2+2")) | |
(global-set-key (kbd "C-c C-d") 'insert-debugger) | |
(key-chord-mode -1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment