diff --git a/core/core-osx.el b/core/core-osx.el index db443265b..030ed4bad 100644 --- a/core/core-osx.el +++ b/core/core-osx.el @@ -7,6 +7,17 @@ ;; Don't open files from the workspace in a new frame (setq ns-pop-up-frames nil) +;; Prefixes: Command = M, Alt = A +(setq mac-command-modifier 'meta) +(setq mac-option-modifier 'alt) + +;; Restore text nav keys +(bind (kbd "") 'backward-word + (kbd "") 'forward-word + (kbd "M-a") 'mark-whole-buffer + (kbd "M-v") 'evil-paste-after + (kbd "M-s") 'save-buffer) + ;; fix emacs PATH on OSX (GUI only) (use-package exec-path-from-shell :if (memq window-system '(mac ns)) diff --git a/init/my-bindings.el b/init/my-bindings.el index 4f51a3394..148014234 100644 --- a/init/my-bindings.el +++ b/init/my-bindings.el @@ -2,16 +2,15 @@ ;; Global keymaps ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(bind (kbd "≈") 'smex - (kbd "˛") 'smex-major-mode-commands +(bind (kbd "A-x") 'smex + (kbd "A-X") 'smex-major-mode-commands (kbd "C-;") 'eval-expression (kbd "C-`") 'popwin:toggle-popup-window (kbd "M-=") 'text-scale-increase (kbd "M--") 'text-scale-decrease (kbd "M-w") 'evil-window-delete - (kbd "M-/") 'evilnc-comment-or-uncomment-lines - (kbd "M-s") 'save-buffer) + (kbd "M-/") 'evilnc-comment-or-uncomment-lines) ;; Faster scrolling (bind 'motion my-mode-map @@ -97,6 +96,15 @@ "C-w C-u" 'winner-undo "C-w C-r" 'winner-redo + ;; buffer navigation + "C-h" 'evil-window-left + "C-j" 'evil-window-down + "C-k" 'evil-window-up + "C-l" 'evil-window-right + + ;; restore help key + "M-h" 'help-command + ;; Increment/decrement number under cursor "C-=" 'evil-numbers/inc-at-pt "C--" 'evil-numbers/dec-at-pt) @@ -191,8 +199,8 @@ [remap move-beginning-of-line] 'my.move-to-bol ;; Restore bash-esque keymaps in insert mode; C-w and C-a already exist - "\C-e" 'my.move-to-eol - "\C-u" 'my.backward-kill-to-bol-and-indent + "C-e" 'my.move-to-eol + "C-u" 'my.backward-kill-to-bol-and-indent ;; Fixes delete (kbd "") 'delete-char)