65 lines
2.0 KiB
EmacsLisp
65 lines
2.0 KiB
EmacsLisp
|
;;; prelude-ido.el --- Ido setup
|
||
|
;;
|
||
|
;; Copyright © 2011-2017 Bozhidar Batsov
|
||
|
;;
|
||
|
;; Author: Bozhidar Batsov <bozhidar@batsov.com>
|
||
|
;; URL: https://github.com/bbatsov/prelude
|
||
|
;; Version: 1.0.0
|
||
|
;; Keywords: convenience
|
||
|
|
||
|
;; This file is not part of GNU Emacs.
|
||
|
|
||
|
;;; Commentary:
|
||
|
|
||
|
;; Ido-related config.
|
||
|
|
||
|
;;; License:
|
||
|
|
||
|
;; This program is free software; you can redistribute it and/or
|
||
|
;; modify it under the terms of the GNU General Public License
|
||
|
;; as published by the Free Software Foundation; either version 3
|
||
|
;; of the License, or (at your option) any later version.
|
||
|
;;
|
||
|
;; This program is distributed in the hope that it will be useful,
|
||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
;; GNU General Public License for more details.
|
||
|
;;
|
||
|
;; You should have received a copy of the GNU General Public License
|
||
|
;; along with GNU Emacs; see the file COPYING. If not, write to the
|
||
|
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
;; Boston, MA 02110-1301, USA.
|
||
|
|
||
|
;;; Code:
|
||
|
(prelude-require-packages '(flx-ido ido-completing-read+ smex))
|
||
|
|
||
|
(require 'ido)
|
||
|
(require 'ido-completing-read+)
|
||
|
(require 'flx-ido)
|
||
|
|
||
|
(setq ido-enable-prefix nil
|
||
|
ido-enable-flex-matching t
|
||
|
ido-create-new-buffer 'always
|
||
|
ido-use-filename-at-point 'guess
|
||
|
ido-max-prospects 10
|
||
|
ido-save-directory-list-file (expand-file-name "ido.hist" prelude-savefile-dir)
|
||
|
ido-default-file-method 'selected-window
|
||
|
ido-auto-merge-work-directories-length -1)
|
||
|
(ido-mode +1)
|
||
|
(ido-ubiquitous-mode +1)
|
||
|
|
||
|
;;; smarter fuzzy matching for ido
|
||
|
(flx-ido-mode +1)
|
||
|
;; disable ido faces to see flx highlights
|
||
|
(setq ido-use-faces nil)
|
||
|
|
||
|
;;; smex, remember recently and most frequently used commands
|
||
|
(require 'smex)
|
||
|
(setq smex-save-file (expand-file-name ".smex-items" prelude-savefile-dir))
|
||
|
(smex-initialize)
|
||
|
(global-set-key (kbd "M-x") 'smex)
|
||
|
(global-set-key (kbd "M-X") 'smex-major-mode-commands)
|
||
|
|
||
|
(provide 'prelude-ido)
|
||
|
;;; prelude-ido.el ends here
|