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:
parent
c82f71e7fe
commit
6d10b9bbdf
3 changed files with 55 additions and 53 deletions
|
@ -20,13 +20,9 @@
|
|||
(when (featurep 'exec-path-from-shell)
|
||||
`(exec-path-from-shell-copy-envs ,@vars)))
|
||||
|
||||
;; key conventions:
|
||||
;; alt/option = meta
|
||||
;; windows/command = super
|
||||
|
||||
(cond (IS-MAC
|
||||
(setq mac-command-modifier 'super
|
||||
mac-option-modifier 'meta
|
||||
(setq mac-command-modifier 'meta
|
||||
mac-option-modifier 'alt
|
||||
;; sane trackpad/mouse scroll settings
|
||||
mac-redisplay-dont-reset-vscroll t
|
||||
mac-mouse-wheel-smooth-scroll nil
|
||||
|
@ -68,12 +64,7 @@
|
|||
x-underline-at-descent-line t)) ; draw underline lower
|
||||
|
||||
(IS-WINDOWS
|
||||
(setq w32-get-true-file-attributes nil ; fix file io slowdowns
|
||||
;; map window keys to super (unreliable)
|
||||
w32-pass-lwindow-to-system nil
|
||||
w32-pass-rwindow-to-system nil
|
||||
w32-lwindow-modifier 'super
|
||||
w32-rwindow-modifier 'super)
|
||||
(setq w32-get-true-file-attributes nil) ; fix file io slowdowns
|
||||
(when (display-graphic-p)
|
||||
(setenv "GIT_ASKPASS" "git-gui--askpass"))))
|
||||
|
||||
|
|
|
@ -17,11 +17,9 @@
|
|||
;; Global keybindings
|
||||
|
||||
(map! (:map override
|
||||
;; Make M-x more accessible
|
||||
"s-x" 'execute-extended-command
|
||||
"M-x" 'execute-extended-command
|
||||
;; A little sandbox to run code in
|
||||
"s-;" 'eval-expression)
|
||||
"A-;" 'eval-expression
|
||||
"M-;" 'eval-expression)
|
||||
|
||||
[remap evil-jump-to-tag] #'projectile-find-tag
|
||||
[remap find-tag] #'projectile-find-tag
|
||||
|
@ -68,7 +66,7 @@
|
|||
:m "B" #'realgud:cmd-clear)
|
||||
|
||||
(:when (featurep! :feature eval)
|
||||
:g "s-r" #'+eval/buffer
|
||||
:g "M-r" #'+eval/buffer
|
||||
:nv "gr" #'+eval:region
|
||||
:n "gR" #'+eval/buffer
|
||||
:v "gR" #'+eval:replace-region)
|
||||
|
@ -189,9 +187,9 @@
|
|||
(:map yas-keymap
|
||||
"C-e" #'+snippets/goto-end-of-field
|
||||
"C-a" #'+snippets/goto-start-of-field
|
||||
[s-right] #'+snippets/goto-end-of-field
|
||||
[s-left] #'+snippets/goto-start-of-field
|
||||
[s-backspace] #'+snippets/delete-to-start-of-field
|
||||
[M-right] #'+snippets/goto-end-of-field
|
||||
[M-left] #'+snippets/goto-start-of-field
|
||||
[M-backspace] #'+snippets/delete-to-start-of-field
|
||||
[backspace] #'+snippets/delete-backward-char
|
||||
[delete] #'+snippets/delete-forward-char-or-field)
|
||||
(:map yas-minor-mode-map
|
||||
|
@ -219,7 +217,17 @@
|
|||
:n "gt" #'+workspace/switch-right
|
||||
:n "gT" #'+workspace/switch-left
|
||||
:n "]w" #'+workspace/switch-right
|
||||
:n "[w" #'+workspace/switch-left))
|
||||
:n "[w" #'+workspace/switch-left
|
||||
:g "M-1" (λ! (+workspace/switch-to 0))
|
||||
:g "M-2" (λ! (+workspace/switch-to 1))
|
||||
:g "M-3" (λ! (+workspace/switch-to 2))
|
||||
:g "M-4" (λ! (+workspace/switch-to 3))
|
||||
:g "M-5" (λ! (+workspace/switch-to 4))
|
||||
:g "M-6" (λ! (+workspace/switch-to 5))
|
||||
:g "M-7" (λ! (+workspace/switch-to 6))
|
||||
:g "M-8" (λ! (+workspace/switch-to 7))
|
||||
:g "M-9" (λ! (+workspace/switch-to 8))
|
||||
:g "M-0" #'+workspace/switch-to-last))
|
||||
|
||||
;;; :completion
|
||||
(map! (:when (featurep! :completion company)
|
||||
|
@ -448,9 +456,7 @@
|
|||
:after markdown-mode
|
||||
:map markdown-mode-map
|
||||
;; fix conflicts with private bindings
|
||||
"<backspace>" nil
|
||||
"<s-left>" nil
|
||||
"<s-right>" nil))
|
||||
[backspace] nil))
|
||||
|
||||
|
||||
;;
|
||||
|
|
|
@ -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")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue