2016-08-28 11:20:44 +00:00
|
|
|
;;; config.el --- OSX Layer keybindings File for Spacemacs
|
|
|
|
;;
|
|
|
|
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
|
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
2015-08-23 01:47:30 +00:00
|
|
|
(when (spacemacs/system-is-mac)
|
2015-11-18 00:38:05 +00:00
|
|
|
(spacemacs/set-leader-keys "bf" 'reveal-in-osx-finder)
|
2014-12-12 17:31:55 +00:00
|
|
|
|
2015-06-03 18:31:12 +00:00
|
|
|
;; this is only applicable to GUI mode
|
|
|
|
(when (display-graphic-p)
|
2015-06-12 17:25:20 +00:00
|
|
|
;; Treat command as super
|
2015-06-03 18:31:12 +00:00
|
|
|
(setq mac-command-key-is-meta nil)
|
|
|
|
(setq mac-command-modifier 'super)
|
2015-06-12 17:25:20 +00:00
|
|
|
|
|
|
|
(when osx-use-option-as-meta
|
|
|
|
;; Treat option as meta
|
2016-03-01 13:31:01 +00:00
|
|
|
(setq mac-option-key-is-meta t))
|
|
|
|
(setq mac-option-modifier (if osx-use-option-as-meta 'meta nil))
|
2015-06-03 08:26:40 +00:00
|
|
|
|
2015-06-03 18:31:12 +00:00
|
|
|
;; Keybindings
|
|
|
|
(global-set-key (kbd "s-=") 'spacemacs/scale-up-font)
|
|
|
|
(global-set-key (kbd "s--") 'spacemacs/scale-down-font)
|
|
|
|
(global-set-key (kbd "s-0") 'spacemacs/reset-font-size)
|
|
|
|
(global-set-key (kbd "s-q") 'save-buffers-kill-terminal)
|
2015-06-14 07:54:51 +00:00
|
|
|
(global-set-key (kbd "s-v") 'yank)
|
2015-06-02 23:09:33 +00:00
|
|
|
(global-set-key (kbd "s-c") 'evil-yank)
|
|
|
|
(global-set-key (kbd "s-a") 'mark-whole-buffer)
|
2015-06-03 18:31:12 +00:00
|
|
|
(global-set-key (kbd "s-x") 'kill-region)
|
2015-06-02 23:09:33 +00:00
|
|
|
(global-set-key (kbd "s-w") 'delete-window)
|
|
|
|
(global-set-key (kbd "s-W") 'delete-frame)
|
2015-09-05 14:06:44 +00:00
|
|
|
(global-set-key (kbd "s-n") 'make-frame)
|
2015-06-03 18:31:12 +00:00
|
|
|
(global-set-key (kbd "s-z") 'undo-tree-undo)
|
|
|
|
(global-set-key (kbd "s-s")
|
|
|
|
(lambda ()
|
|
|
|
(interactive)
|
|
|
|
(call-interactively (key-binding "\C-x\C-s"))))
|
|
|
|
(global-set-key (kbd "s-Z") 'undo-tree-redo)
|
2015-07-31 11:02:28 +00:00
|
|
|
(global-set-key (kbd "C-s-f") 'spacemacs/toggle-frame-fullscreen)
|
|
|
|
;; Emacs sometimes registers C-s-f as this weird keycode
|
|
|
|
(global-set-key (kbd "<C-s-268632070>") 'spacemacs/toggle-frame-fullscreen)))
|