Move custom global key bindings to bind-keys

This requires the bind-key package to be pinned (it was installed anyway
as a dependency to use-package).
This commit is contained in:
Gergely Polonkai 2016-10-28 07:32:55 +02:00
parent 3364cdd580
commit deecd0eb5b

29
init.el
View File

@ -62,6 +62,7 @@
alert alert
avy avy
beacon beacon
bind-key
cheatsheet cheatsheet
coffee-mode coffee-mode
command-log-mode command-log-mode
@ -864,6 +865,9 @@
:config :config
(ace-popup-menu-mode 1)) (ace-popup-menu-mode 1))
(use-package bind-key
:ensure t)
;; Load my own functions ;; Load my own functions
(load "gnu-c-header.el") (load "gnu-c-header.el")
(load "toggle-window-split.el") (load "toggle-window-split.el")
@ -919,16 +923,21 @@
(setq c-offset-alist '((member-init-intro . ++))) (setq c-offset-alist '((member-init-intro . ++)))
;; Custom key bindings ;; Custom key bindings
(define-key ctl-x-map (kbd "_") 'maximize-window) (bind-keys
(global-set-key (kbd "C-c C-y") 'duplicate-line) :map global-map
(global-set-key (kbd "M-(") 'æ-enclose-region) ("C-c C-y" . duplicate-line)
(global-set-key (kbd "<C-return>") 'open-line-below) ("M-(" . æ-enclose-region)
(global-set-key (kbd "<C-S-return>") 'open-line-above) ("<C-return>" . open-line-below)
(define-key ctl-x-map (kbd "C-r") 'rename-current-buffer-file) ("<C-S-return>" . open-line-above)
(define-key ctl-x-map (kbd "C-d") 'delete-current-buffer-file) :map ctl-x-map
(define-key ctl-x-map (kbd "~") 'toggle-char-case) ("_" . maximize-window)
(define-key isearch-mode-map (kbd "<C-return>") #'isearch-exit-other-end) ("C-r" . rename-current-buffer-file)
(define-key gpolonkai/pers-map (kbd "m") 'hidden-mode-line-mode) ("C-d" . delete-current-buffer-file)
("~" . toggle-char-case)
:map isearch-mode-map
("<C-return>" . isearch-exit-other-end) ;; TODO: Is this OK this way?
:map gpolonkai/pers-map
("m" . hidden-mode-line-mode))
;; Kudos goes to ;; Kudos goes to
;; http://endlessparentheses.com/leave-the-cursor-at-start-of-match-after-isearch.html ;; http://endlessparentheses.com/leave-the-cursor-at-start-of-match-after-isearch.html