 ;; This is useful especially when renaming files (and the name you want to
 ;; rename to partially matches one of the existing files).
 ;;
-;; |----------------------------+-----------------------------------------------------|
-;; | Command                    | Function                                            |
-;; |----------------------------+-----------------------------------------------------|
-;; | ivy-done                   | Exit the minibuffer with the selected candidate.    |
-;; |                            | Try to leave `ivy' as soon as possible.             |
-;; | ivy-alt-done               | Exit the minibuffer with the selected candidate.    |
-;; |                            | When ARG is t, acts like `ivy-immediate-done'.      |
-;; |                            | Try NOT to leave `ivy' at the soonest. For          |
-;; |                            | instance, if a directory name completion is         |
-;; |                            | possible, do that and list that directory's         |
-;; |                            | content in `ivy' instead of opening that dir        |
-;; |                            | in `dired'.                                         |
-;; | ivy-immediate-done         | Exit the minibuffer with the current text,          |
-;; |                            | ignoring the candidates.                            |
-;; | ivy-call                   | Call the current action without exiting completion. |
-;; | ivy-next-line-and-call     | Move cursor vertically down ARG candidates.         |
-;; |                            | Call the permanent action if possible.              |
-;; | ivy-previous-line-and-call | Move cursor vertically up ARG candidates.           |
-;; |                            | Call the permanent action if possible.              |
-;; |----------------------------+-----------------------------------------------------|
+;; |----------------------------+----------------+------------------------------------------------------|
+;; | Command                    | ivy map        | Function                                             |
+;; |                            | Bindings       |                                                      |
+;; |----------------------------+----------------+------------------------------------------------------|
+;; | ivy-done                   | C-j            | Exit the minibuffer with the selected candidate.     |
+;; |                            | (default: C-m) | Try to leave `ivy' as soon as possible.              |
+;; |----------------------------+----------------+------------------------------------------------------|
+;; | ivy-alt-done               | C-m or RET     | Exit the minibuffer with the selected candidate.     |
+;; |                            | (default: C-j) | When ARG is t, acts like `ivy-immediate-done'.       |
+;; |                            |                | Try NOT to leave `ivy' at the soonest. For           |
+;; |                            |                | instance, if a directory name completion is          |
+;; |                            |                | possible, do that and list that directory's          |
+;; |                            |                | content in `ivy' instead of opening that dir         |
+;; |                            |                | in `dired'.                                          |
+;; |----------------------------+----------------+------------------------------------------------------|
+;; | ivy-immediate-done         | C-S-m          | Exit the minibuffer with the current text,           |
+;; |                            |                | ignoring the candidates.                             |
+;; |----------------------------+----------------+------------------------------------------------------|
+;; | ivy-partial-or-done        | TAB            | Attempts partial completion, extending current line  |
+;; |                            |                | input as much as possible. "TAB TAB" is the same as  |
+;; |                            |                | `ivy-alt-done'.                                      |
+;; |----------------------------+----------------+------------------------------------------------------|
+;; | ivy-call                   | C-M-m          | Call the current action without exiting completion.  |
+;; |----------------------------+----------------+------------------------------------------------------|
+;; | ivy-next-line-and-call     | C-M-n          | Move cursor vertically down ARG candidates.          |
+;; |                            |                | Call the permanent action if possible.               |
+;; | ivy-previous-line-and-call | C-M-p          | Move cursor vertically up ARG candidates.            |
+;; |                            |                | Call the permanent action if possible.               |
+;; |----------------------------+----------------+------------------------------------------------------|
+;; | ivy-dispatching-done       | M-o            | Presents valid actions from which to choose. When    |
+;; |                            |                | only one action is available, there is no difference |
+;; |                            |                | between this and `ivy-done'.                         |
+;; |----------------------------+----------------+------------------------------------------------------|

      (ivy-done))
    (bind-keys
     :map ivy-switch-buffer-map
      ("C-k" . modi/ivy-kill-buffer))

    ;; Override the default binding for `upcase-word'
    (bind-key "M-u" #'ivy-resume modi-mode-map)
    (bind-key "M-o" #'ivy-recentf)))


(provide 'setup-ivy)

;; Time-stamp: <2016-05-16 11:06:53 kmodi>

;; Ivy (better than ido in my opinion)

(use-package ivy
  :bind (:map modi-mode-map
         ("M-u" . ivy-resume)) ; Override the default binding for `upcase-word'
  :bind (("M-o" . ivy-recentf))
  :config
  (progn
    ;; Disable ido
