Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.9 KiB

  1. ;;; prelude-ido.el --- Ido setup
  2. ;;
  3. ;; Copyright © 2011-2020 Bozhidar Batsov
  4. ;;
  5. ;; Author: Bozhidar Batsov <bozhidar@batsov.com>
  6. ;; URL: https://github.com/bbatsov/prelude
  7. ;; This file is not part of GNU Emacs.
  8. ;;; Commentary:
  9. ;; Ido-related config.
  10. ;;; License:
  11. ;; This program is free software; you can redistribute it and/or
  12. ;; modify it under the terms of the GNU General Public License
  13. ;; as published by the Free Software Foundation; either version 3
  14. ;; of the License, or (at your option) any later version.
  15. ;;
  16. ;; This program is distributed in the hope that it will be useful,
  17. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. ;; GNU General Public License for more details.
  20. ;;
  21. ;; You should have received a copy of the GNU General Public License
  22. ;; along with GNU Emacs; see the file COPYING. If not, write to the
  23. ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  24. ;; Boston, MA 02110-1301, USA.
  25. ;;; Code:
  26. (prelude-require-packages '(flx-ido ido-completing-read+ smex))
  27. (require 'ido)
  28. (require 'ido-completing-read+)
  29. (require 'flx-ido)
  30. (setq ido-enable-prefix nil
  31. ido-enable-flex-matching t
  32. ido-create-new-buffer 'always
  33. ido-use-filename-at-point 'guess
  34. ido-max-prospects 10
  35. ido-save-directory-list-file (expand-file-name "ido.hist" prelude-savefile-dir)
  36. ido-default-file-method 'selected-window
  37. ido-auto-merge-work-directories-length -1)
  38. (ido-mode +1)
  39. (ido-ubiquitous-mode +1)
  40. ;;; smarter fuzzy matching for ido
  41. (flx-ido-mode +1)
  42. ;; disable ido faces to see flx highlights
  43. (setq ido-use-faces nil)
  44. ;;; smex, remember recently and most frequently used commands
  45. (require 'smex)
  46. (setq smex-save-file (expand-file-name ".smex-items" prelude-savefile-dir))
  47. (smex-initialize)
  48. (global-set-key (kbd "M-x") 'smex)
  49. (global-set-key (kbd "M-X") 'smex-major-mode-commands)
  50. (provide 'prelude-ido)
  51. ;;; prelude-ido.el ends here