Revert to Meta, instead of Super

Using meta is a little more flexible. Since there is no dedicated meta
key on our keyboards (anymore), it can be remapped to another modifier
by changing mac-command-modifier, x-meta-keysym, etc. without
sacrificing super or alt keybinds.
This commit is contained in:
Henrik Lissner 2018-12-31 15:00:05 -05:00
parent c82f71e7fe
commit 6d10b9bbdf
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 55 additions and 53 deletions

View file

@ -127,35 +127,8 @@
(when IS-MAC
;; Fix MacOS shift+tab
(define-key input-decode-map [S-iso-lefttab] [backtab])
(define-key!
;; Buffer-local font scaling
"s-+" (λ! (text-scale-set 0))
"s-=" #'text-scale-increase
"s--" #'text-scale-decrease
;; Fix frame-switching on MacOS
"s-`" #'other-frame
;; Simple window/frame navigation/manipulation
"s-w" #'delete-window
"s-W" #'delete-frame
"s-n" #'+default/new-buffer
"s-N" #'make-frame
;; Textmate-esque bindings
"s-a" #'mark-whole-buffer
"s-b" #'+default/compile
"s-f" #'swiper
"s-q" (if (daemonp) #'delete-frame #'evil-quit-all)
;; Restore OS undo, save, copy, & paste keys (without cua-mode, because
;; it imposes some other functionality and overhead we don't need)
"s-z" #'undo
"s-s" #'save-buffer
"s-c" (if (featurep 'evil) 'evil-yank 'copy-region-as-kill)
"s-v" #'yank
;; textmate-esque newline insertion
[s-return] #'evil-open-below
[S-s-return] #'evil-open-above
;; textmate-esque deletion
[s-backspace] #'doom/backward-kill-to-bol-and-indent))
;; Fix frame-switching key on MacOS
(global-set-key (kbd "M-`") #'other-frame))
;;
@ -166,6 +139,38 @@
(map! "C-b" #'backward-word
"C-f" #'forward-word)
;; Make M-x more accessible
(define-key! 'override
"M-x" #'execute-extended-command
"A-x" #'execute-extended-command)
(define-key!
;; Buffer-local font scaling
"M-+" (λ! (text-scale-set 0))
"M-=" #'text-scale-increase
"M--" #'text-scale-decrease
;; Simple window/frame navigation/manipulation
"M-w" #'delete-window
"M-W" #'delete-frame
"M-n" #'+default/new-buffer
"M-N" #'make-frame
;; Restore OS undo, save, copy, & paste keys (without cua-mode, because
;; it imposes some other functionality and overhead we don't need)
"M-z" #'undo
"M-s" #'save-buffer
"M-c" (if (featurep 'evil) 'evil-yank 'copy-region-as-kill)
"M-v" #'yank
;; Textmate-esque bindings
"M-a" #'mark-whole-buffer
"M-b" #'+default/compile
"M-f" #'swiper
"M-q" (if (daemonp) #'delete-frame #'evil-quit-all)
;; textmate-esque newline insertion
[M-return] #'evil-open-below
[M-S-return] #'evil-open-above
;; textmate-esque deletion
[M-backspace] #'doom/backward-kill-to-bol-and-indent)
(if (featurep 'evil)
(load! "+evil-bindings")
(load! "+emacs-bindings")))