   "ms"  'sp-forward-slurp-sexp
   "mta"  (lambda () (interactive) (ert t))
   "mtf" 'ert)
-;; erlang ---------------------------------------------------------------------
-(evil-leader/set-key-for-mode 'erlang-mode
-  "md" 'edts-find-doc
-  "me" 'edts-code-next-issue
-  "mG" 'edts-find-global-function
-  "mg" 'edts-find-source-under-point
-  "mh" 'edts-find-header-source
-  "ml" 'edts-find-local-function
-  "mm" 'edts-find-macro-source
-  "mr" 'edts-find-record-source)
-;; ledger ---------------------------------------------------------------------
-(evil-leader/set-key-for-mode 'ledger-mode
-  "md" 'ledger-delete-current-transaction
-  "ma" 'ledger-add-transaction)
-;; magit ----------------------------------------------------------------------
-(evil-add-hjkl-bindings magit-branch-manager-mode-map 'emacs
-  "K" 'magit-discard-item
-  "L" 'magit-key-mode-popup-logging)
-(evil-add-hjkl-bindings magit-commit-mode-map 'emacs)
-(evil-add-hjkl-bindings magit-log-mode-map 'emacs)
-(evil-add-hjkl-bindings magit-process-mode-map 'emacs)
-(evil-add-hjkl-bindings magit-status-mode-map 'emacs
-  "f" 'magit-key-mode-popup-fetching
-  "K" 'magit-discard-item
-  "l" 'magit-key-mode-popup-logging
-  "h" 'magit-toggle-diff-refine-hunk)
-;; python ---------------------------------------------------------------------
-(evil-leader/set-key-for-mode 'python-mode
-  "mB"  (lambda ()
-          " Send buffer content to shell and switch to it in insert mode."
-          (interactive)
-          (python-shell-send-buffer)
-          (python-shell-switch-to-shell)
-          (evil-insert-state))
-  "mb"  'python-shell-send-buffer
-  "md"  'pylookup-lookup
-  "mF"  (lambda ()
-          " Send function content to shell and switch to it in insert mode."
-          (interactive)
-          (python-shell-send-defun nil)
-          (python-shell-switch-to-shell)
-          (evil-insert-state))
-  "mf"  'python-shell-send-defun
-  "mg"  'jedi:goto-definition
-  "mi"  (lambda ()
-          " Switch to shell in insert mode."
-          (interactive)
-          (python-shell-switch-to-shell)
-          (evil-insert-state))
-  "mp"  'python-add-breakpoint
-  "mR"  (lambda (start end)
-          " Send region content to shell and switch to it in insert mode."
-          (interactive "r")
-          (python-shell-send-region start end)
-          (python-shell-switch-to-shell)
-          (evil-insert-state))
-  "mr"  'python-shell-send-region
-  "mTf" 'nosetests-pdb-one
-  "mtf" 'nosetests-one
-  "mTa" 'nosetests-pdb-all
-  "mta" 'nosetests-all
-  "mTm" 'nosetests-pdb-module
-  "mtm" 'nosetests-module
-  "mTs" 'nosetests-pdb-suite
-  "mts" 'nosetests-suite
-  "m RET" 'quickrun
-)
-(eval-after-load "python"
-  '(progn
-     (define-key inferior-python-mode-map (kbd "C-j") 'comint-next-input)
-     (define-key inferior-python-mode-map (kbd "C-k") 'comint-previous-input)))
-;; R --------------------------------------------------------------------------
-(eval-after-load "ess-site"
-  '(progn
-     (evil-leader/set-key-for-mode 'ess-mode
-       "mB" 'ess-eval-buffer-and-go
-       "mb" 'ess-eval-buffer
-       "mF" 'ess-eval-function-and-go
-       "mf" 'ess-eval-function
-       "mi" 'R
-       "mL" 'ess-eval-line-and-go
-       "ml" 'ess-eval-line
-       "mp" 'ess-R-object-popup
-       "mR" 'ess-eval-region-and-go
-       "mr" 'ess-eval-region
-       "mS" 'ess-eval-function-or-paragraph-and-step
-       "ms" 'ess-eval-region-or-line-and-step
-       "mvp" 'ess-R-dv-pprint
-       "mvt" 'ess-R-dv-ctable
-       )
-     (define-key inferior-ess-mode-map (kbd "C-j") 'comint-next-input)
-     (define-key inferior-ess-mode-map (kbd "C-k") 'comint-previous-input)))
 ;; rcirc ----------------------------------------------------------------------
 (eval-after-load "rcirc"
   '(progn

  "x+"  'text-scale-increase
  "x-"  'text-scale-decrease
  "xdw" 'delete-trailing-whitespace
  "xmj" 'move-text-down
  "xmk" 'move-text-up
  "xtc" 'transpose-chars
  "xtl" 'transpose-lines
  "xtw" 'transpose-words

;; instantly display current keystrokes in mini buffer
(setq echo-keystrokes 0.02)

;; simple and more consistent keyboard quit key bindings
;; thanks to Bin Chen for the idea (http://blog.binchen.org/?p=735)
(global-set-key (kbd "f")
  (lambda () (interactive) (fd-trigger 'keyboard-quit)))
(define-key minibuffer-local-map (kbd "f")
  (lambda () (interactive) (fd-trigger 'abort-recursive-edit)))
;; evil
;; easier toggle for emacs-state
(evil-set-toggle-key "s-`")
;; returns to normal mode
