-;;; keybindings.el --- madand-base layer keybindings file for Spacemacs.
+;;; keybindings.el --- madand-base layer keybindings for Spacemacs.
 ;;
 ;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
 ;;

(spacemacs/set-leader-keys
  ";" #'evil-avy-goto-line
  "id" #'madand/insert-date
  "ij" (lambda (count)
         (interactive "p")
         (evil-save-state (evil-open-below count)))
  "ik" (lambda (count)
         (interactive "p")
         (evil-save-state (evil-open-above count)))
  "o SPC" #'redraw-display
  "os" #'save-buffer
  "oS" #'scroll-all-mode

  "wO" #'delete-other-windows)

;; We distinguish C-i and <tab> in GUI, but this distinction is not
;; desired in Hybrid state.
(define-key evil-hybrid-state-map [C-i] (kbd "<tab>"))
;; A cup of Vim for the Hybrid state.
(define-key evil-hybrid-state-map (kbd "C-o") 'evil-execute-in-normal-state)
(define-key evil-hybrid-state-map (kbd "C-r") 'evil-paste-from-register)
(define-key evil-hybrid-state-map (kbd "C-h") (kbd "DEL"))
(define-key evil-hybrid-state-map (kbd "C-S-h") help-map)
;; Make Q a buffer killer.
(define-key evil-normal-state-map (kbd "Q") 'spacemacs/kill-this-buffer)
(define-key evil-motion-state-map (kbd "Q") 'spacemacs/kill-this-buffer)
;; Unbind some Vim bindings, so that Emacs ones come into play.
(define-key evil-motion-state-map (kbd "C-e") nil)

;;; keybindings.el ends here
