 ;; C-u C-u `ace-jump-mode' -> `ace-jump-line-mode'
 
 ;; Key bindings
+(if (featurep 'avy)
+    (bind-key "<f1>" #'modi/goto-line modi-mode-map)
+  (bind-key "<f1>" #'goto-line modi-mode-map))
+
 (bind-keys
  :map modi-mode-map
-  ("<f1>"   . goto-line)
   ;; Move faster
   ("C-S-n"  . next-line-fast)
   ("C-S-p"  . previous-line-fast)

(use-package avy
  :config
  (progn
    (setq avy-style 'at-full)
    (setq avy-styles-alist '((avy-goto-word-1 . pre)))

    (defun my/avy (arg)
      "
        `my/avy' -> `avy-goto-word-1'
    C-u `my/avy' -> `avy-goto-char-2'
C-u C-u `my/avy' -> `avy-goto-line'
"
      (interactive "p")
      (let ((avy-all-windows t) ; search in all windows
            (fn (cl-case arg
                  (4  'avy-goto-char-2) ; C-u
                  (16 'avy-goto-line) ; C-u C-u
                  (t  'avy-goto-word-1))))
        (funcall fn)))

    (bind-key "C-SPC" #'avy-isearch isearch-mode-map) ; isearch > avy


;; Time-stamp: <2015-05-18 16:42:21 kmodi>

;; iy-go-to-char
;; https://github.com/doitian/iy-go-to-char
