summary refs log tree commit diff stats
path: root/tag-emacs/emacs.d
diff options
context:
space:
mode:
authorAlan Pearce2016-03-11 11:27:41 +0100
committerAlan Pearce2016-03-11 11:27:41 +0100
commit771cb159d960965603c6f0d44e34cb76f611d7d4 (patch)
treeb266c7b98a16d881bde75e8dd19d17762dbe75ed /tag-emacs/emacs.d
parent6ed46d62249d7ada3f1203a6f03d7fa8bc58ae0c (diff)
downloaddotfiles-771cb159d960965603c6f0d44e34cb76f611d7d4.tar.lz
dotfiles-771cb159d960965603c6f0d44e34cb76f611d7d4.tar.zst
dotfiles-771cb159d960965603c6f0d44e34cb76f611d7d4.zip
Emacs: Fix s-x map on OS X
Diffstat (limited to 'tag-emacs/emacs.d')
-rw-r--r--tag-emacs/emacs.d/init.org105
1 files changed, 53 insertions, 52 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 280dfa3..8315769 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -325,6 +325,59 @@ modes.
 #+END_SRC
 
 
+* Keybindings
+
+I think =set-keyboard-coding-system= stops OS X from doing something
+annoying to add accents.  The modifier setup is to match my
+re-arrangement of modifiers on OSX: Cmd on the outside, then
+Option/alt, then Control.
+
+#+BEGIN_SRC emacs-lisp
+  (when (eq system-type 'darwin)
+    (set-keyboard-coding-system nil)
+    (custom-set-variables
+     '(mac-option-modifier 'meta)
+     '(mac-right-option-modifier '(:function 'alt :mouse 'alt))
+     '(mac-control-modifier 'control)
+     '(mac-right-control-modifier 'left)
+     '(mac-command-modifier 'super)
+     '(mac-right-command-modifier 'left)
+     '(mac-function-modifier 'hyper))
+    (unbind-key "s-x"))
+#+END_SRC
+
+#+BEGIN_SRC emacs-lisp
+  (unbind-key "<f4>")
+  (bind-key* "<f5>" #'compile)
+  (bind-key* "<f6>" #'kmacro-start-macro-or-insert-counter)
+  (bind-key* "<f7>" #'kmacro-end-or-call-macro)
+
+  (bind-key* "<apps>" #'execute-extended-command)
+
+  (unbind-key "C-z")
+  (bind-key* "C-<tab>" #'other-window)
+
+  (bind-key* "C-x C-r" #'revert-buffer)
+  (bind-key* "C-x C-j" #'delete-indentation)
+  (unbind-key "C-x C-c")
+
+  (bind-key* "C-c i" #'insert-char)
+  (bind-key* "M-/" #'hippie-expand)
+
+  (unbind-key "s-h")
+  (unbind-key "s-n")
+  (unbind-key "s-p")
+  (unbind-key "s-w")
+  (bind-key* "s-k" #'kill-or-delete-this-buffer-dwim)
+
+  (bind-key "C-M-a" #'backward-paragraph text-mode-map)
+  (bind-key "C-M-e" #'forward-paragraph text-mode-map)
+
+  (bind-key* "s-x" (define-prefix-command 'super-x-map))
+  (bind-key* "s-," #'switch-to-dotfiles)
+  (bind-key* "C-M-x" #'execute-extended-command)
+  (set-register ?z `(file . ,(expand-file-name ".config/zsh/zshrc" "~")))
+#+END_SRC
 * Projects
 
    #+BEGIN_SRC emacs-lisp
@@ -1172,58 +1225,6 @@ rather useful.
             (setq eldoc-idle-delay 0.1)
             (eldoc-add-command 'paredit-backward-delete 'paredit-close-round)))
 #+END_SRC
-* Keybindings
-
-I think =set-keyboard-coding-system= stops OS X from doing something
-annoying to add accents.  The modifier setup is to match my
-re-arrangement of modifiers on OSX: Cmd on the outside, then
-Option/alt, then Control.
-
-#+BEGIN_SRC emacs-lisp
-  (when (eq system-type 'darwin)
-    (set-keyboard-coding-system nil)
-    (custom-set-variables
-     '(mac-option-modifier 'meta)
-     '(mac-right-option-modifier '(:function 'alt :mouse 'alt))
-     '(mac-control-modifier 'control)
-     '(mac-right-control-modifier 'left)
-     '(mac-command-modifier 'super)
-     '(mac-right-command-modifier 'left)
-     '(mac-function-modifier 'hyper)))
-#+END_SRC
-
-#+BEGIN_SRC emacs-lisp
-  (unbind-key "<f4>")
-  (bind-key* "<f5>" #'compile)
-  (bind-key* "<f6>" #'kmacro-start-macro-or-insert-counter)
-  (bind-key* "<f7>" #'kmacro-end-or-call-macro)
-
-  (bind-key* "<apps>" #'execute-extended-command)
-
-  (unbind-key "C-z")
-  (bind-key* "C-<tab>" #'other-window)
-
-  (bind-key* "C-x C-r" #'revert-buffer)
-  (bind-key* "C-x C-j" #'delete-indentation)
-  (unbind-key "C-x C-c")
-
-  (bind-key* "C-c i" #'insert-char)
-  (bind-key* "M-/" #'hippie-expand)
-
-  (unbind-key "s-h")
-  (unbind-key "s-n")
-  (unbind-key "s-p")
-  (unbind-key "s-w")
-  (bind-key* "s-k" #'kill-or-delete-this-buffer-dwim)
-
-  (bind-key "C-M-a" #'backward-paragraph text-mode-map)
-  (bind-key "C-M-e" #'forward-paragraph text-mode-map)
-
-  (bind-key* "s-x" (define-prefix-command 'super-x-map))
-  (bind-key* "s-," #'switch-to-dotfiles)
-  (bind-key* "C-M-x" #'execute-extended-command)
-  (set-register ?z `(file . ,(expand-file-name ".config/zsh/zshrc" "~")))
-#+END_SRC
 * Misc
 
 #+BEGIN_SRC emacs-lisp