Difference between revisions of "Ido"

From WikEmacs
Jump to: navigation, search
m (cats)
(add some common customizations)
Line 32: Line 32:
 
(setq ido-enable-flex-matching t)
 
(setq ido-enable-flex-matching t)
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
=== Ignore Case ===
 +
 +
{{Snippet|(setq ido-case-fold t)}}
 +
 +
=== Virtual Buffers ===
 +
 +
If [[Recentf]] is enabled, you can use {{CommandKeys|C-x b|ido-switch-buffer}} to visit recently closed files by enabling virtual buffers:
 +
{{Snippet|(setq ido-use-virtual-buffers t)}}
 +
 +
=== Prevent Auto-Merge ===
 +
 +
Ido's default behavior when there is no matching file in the current directory is to look in recent working directories. If you prefer to limit {{CommandKeys|C-x C-f|ido-find-file}} to the current directory you can disable this ''auto-merge'' behavior:
 +
{{Snippet|(setq ido-auto-merge-work-directories-length -1) ;; disable auto-merge}}
 +
 +
You can still look in other working directories explicitly with {{Keys|M-s|ido-merge-work-directories}}.
 +
 +
=== Directory Caching on Windows ===
 +
 +
On [[Windows]] operating systems it can be unreliable to cache directory listings: the directory may not appear to be modified even though files have been added or removed. Ido caches directory listings by default, which may cause confusion on Windows. You can disable caching:
 +
 +
<syntaxhighlight lang="lisp">
 +
(when (equal system-type 'windows-nt)
 +
  (setq ido-max-dir-file-cache 0)) ; caching unreliable
 +
</syntaxhighlight>
 +
  
 
== See Also ==
 
== See Also ==

Revision as of 12:34, 3 April 2012

Ido
Description Interactive Do MiniBuffer Enhancement
Author name of author
Maintainer FSF
Source http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/ido.el
Part of Emacs yes

Ido - Interactively do things is a very convenient way to find files and switch buffers.

Basic setup

(ido-mode)
(ido-everywhere 1)

Helpful keybindings

[C-s]
Move to next ido suggestion.
[C-r]
Move to previous ido suggestion.

Common Customization

Enable Fuzzy Matching

(setq ido-enable-flex-matching t)

Ignore Case

(setq ido-case-fold t)

Virtual Buffers

If Recentf is enabled, you can use [C-x b] (or M-x ido-switch-buffer) to visit recently closed files by enabling virtual buffers:

(setq ido-use-virtual-buffers t)

Prevent Auto-Merge

Ido's default behavior when there is no matching file in the current directory is to look in recent working directories. If you prefer to limit [C-x C-f] (or M-x ido-find-file) to the current directory you can disable this auto-merge behavior:

(setq ido-auto-merge-work-directories-length -1) ;; disable auto-merge

You can still look in other working directories explicitly with [M-s].

Directory Caching on Windows

On Windows operating systems it can be unreliable to cache directory listings: the directory may not appear to be modified even though files have been added or removed. Ido caches directory listings by default, which may cause confusion on Windows. You can disable caching:

(when (equal system-type 'windows-nt)
  (setq ido-max-dir-file-cache 0)) ; caching unreliable


See Also

Helm