  :v "!"      'rotate-region
  :e [escape] 'evil-normal-state
 
+ (:map evil-window-map ; prefix "C-w"
+   "u"       'winner-undo
+   "C-u"     'winner-undo
+   "C-r"     'winner-redo
+
+   "C-w"     'ace-window
+   "C-S-w"   (λ (ace-window 4))    ; swap windows
+   "C-C"     (λ (ace-window 16)))  ; delete windows
+
+ ;; Vim omni-complete emulation
  :i "C-SPC"     'company-complete-common
- :i "C-x C-k"   'company-dictionary
+ :i "C-x C-k"   'company-dict
  :i "C-x C-f"   'company-files
  :i "C-x C-]"   'company-tags
  :i "C-x s"     'company-ispell

             (evil-visual-restore))

 ;; undo/redo for regions
 ;; "u"    'undo-tree-undo
 ;; "C-r"  'redo-tree-redo

 :v "*"   'evil-visualstar/begin-search-forward
 :v "#"   'evil-visualstar/begin-search-backward


;; Restores "dumb" indentation to the tab key. This rustles a lot of
;; peoples' jimmies, apparently, but it's how I like it.
(bind! :i "<tab>"   'narf/dumb-indent
       :i "<C-tab>" 'indent-for-tab-command

       ;; No dumb-tab for lisp
       :i :map lisp-mode-map        [remap narf/dumb-indent] 'indent-for-tab-command
       :i :map emacs-lisp-mode-map  [remap narf/dumb-indent] 'indent-for-tab-command

       ;; Highjacks space/backspace to:
       ;;   a) delete spaces on either side of the cursor, if present ( | ) -> (|)
       ;;   b) allow backspace to delete space-indented blocks intelligently
       ;;   c) and not do any of this magic when inside a string
       :i "SPC"                                  'narf/inflate-space-maybe
       :i [remap backward-delete-char-untabify]  'narf/deflate-space-maybe
       :i [remap newline]                        'narf/newline-and-indent

       ;; Smarter move-to-beginning-of-line
       :i [remap move-beginning-of-line]         'narf/move-to-bol

       ;; Restore bash-esque keymaps in insert mode; C-w and C-a already exist
       :i "C-e" 'narf/move-to-eol
       :i "C-u" 'narf/backward-kill-to-bol-and-indent

       ;; Fixes delete
       :i "<kp-delete>" 'delete-char

       ;; Fix osx keymappings and then some
       :i "<M-left>"   'narf/move-to-bol
       :i "<M-right>"  'narf/move-to-eol
       :i "<M-up>"     'beginning-of-buffer
       :i "<M-down>"   'end-of-buffer
       :i "<C-up>"     'smart-up
       :i "<C-down>"   'smart-down

       ;; Fix emacs motion keys
       :i "A-b"      'evil-backward-word-begin
       :i "A-w"      'evil-forward-word-begin
       :i "A-e"      'evil-forward-word-end

       ;; Textmate-esque insert-line before/after
       :ni "<M-return>"    'evil-open-below
       :ni "<S-M-return>"  'evil-open-above

       ;; Make ESC quit all the things
       :e [escape] 'narf-minibuffer-quit
       (:map (minibuffer-local-map
              minibuffer-local-ns-map
              minibuffer-local-completion-map
              minibuffer-local-must-match-map
              minibuffer-local-isearch-map)
         [escape] 'narf-minibuffer-quit)

       :map read-expression-map "C-w" 'evil-delete-backward-word

       ;; Line selection via linum
       "<left-margin> <down-mouse-1>"    'narf/mouse-select-line
       "<left-margin> <mouse-1>"         'narf/mouse-select-line
       "<left-margin> <drag-mouse-1>"    'narf/mouse-select-line
       "<left-margin> <double-mouse-1>"  'narf/mouse-select-block)

;; Disable the global drag-mouse map; clicking in new buffers often sends evil
;; into visual mode, which is UN...ACCEPTAABBLLLEEEE!
(global-unset-key (kbd "<drag-mouse-1>"))

(provide 'my-bindings)
;;; my-bindings.el ends here
