| 1 | ;;; bandali-ido.el --- bandali's Ido setup -*- lexical-binding: t; -*- |
| 2 | |
| 3 | ;; Copyright (C) 2018-2020 Amin Bandali |
| 4 | |
| 5 | ;; Author: Amin Bandali <bandali@gnu.org> |
| 6 | ;; Keywords: convenience, matching |
| 7 | |
| 8 | ;; This program is free software; you can redistribute it and/or modify |
| 9 | ;; it under the terms of the GNU General Public License as published by |
| 10 | ;; the Free Software Foundation, either version 3 of the License, or |
| 11 | ;; (at your option) any later version. |
| 12 | |
| 13 | ;; This program is distributed in the hope that it will be useful, |
| 14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | ;; GNU General Public License for more details. |
| 17 | |
| 18 | ;; You should have received a copy of the GNU General Public License |
| 19 | ;; along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 20 | |
| 21 | ;;; Commentary: |
| 22 | |
| 23 | ;; My (currently unused) Ido setup. |
| 24 | |
| 25 | ;;; Code: |
| 26 | |
| 27 | (use-package ido |
| 28 | :demand |
| 29 | :bind |
| 30 | (:map ido-common-completion-map |
| 31 | ([escape] . minibuffer-keyboard-quit) |
| 32 | ("DEL" . b/ido-backspace)) |
| 33 | :config |
| 34 | (require 'delsel) |
| 35 | (defun b/ido-backspace () |
| 36 | "Forward to `backward-delete-char'. On error (read-only), quit." |
| 37 | (interactive) |
| 38 | (condition-case nil |
| 39 | (backward-delete-char 1) |
| 40 | (error |
| 41 | (minibuffer-keyboard-quit)))) |
| 42 | (ido-mode 1) |
| 43 | (ido-everywhere 1) |
| 44 | :custom |
| 45 | (ido-enable-flex-matching t) |
| 46 | ;; (ido-enable-regexp t) |
| 47 | ;; (ido-enable-prefix t) |
| 48 | (ido-max-window-height 10) |
| 49 | (ido-use-virtual-buffers t)) |
| 50 | |
| 51 | (use-package ido-vertical-mode |
| 52 | :defer 0.3 |
| 53 | :config |
| 54 | (ido-vertical-mode 1) |
| 55 | :custom |
| 56 | (ido-vertical-define-keys 'C-n-C-p-up-and-down) |
| 57 | (ido-vertical-show-count t)) |
| 58 | |
| 59 | (use-package ido-completing-read+ |
| 60 | :defer 0.3 |
| 61 | :after ido |
| 62 | :config |
| 63 | (ido-ubiquitous-mode 1)) |
| 64 | |
| 65 | (use-package crm-custom |
| 66 | :defer 0.3 |
| 67 | :after crm |
| 68 | :config |
| 69 | (crm-custom-mode 1)) |
| 70 | |
| 71 | (use-package ido-at-point |
| 72 | :defer 0.3 |
| 73 | :config |
| 74 | (ido-at-point-mode 1)) |
| 75 | |
| 76 | (provide 'bandali-ido) |
| 77 | ;;; bandali-ido.el ends here |