Monday, June 12, 2006

Emacs ido.el

The ido.el is now a default elisp package in Emacs 23. You can get the newest version from CVS.
Use following elisp to enable ido-mode:

(require 'ido)
(ido-mode t)


Typing C-x C-f will run ido-find-file. There are some advantages, the files can be found more quickly. However, the ido-cache will not be refreshed automatically when directories are modified. There are some useful commands.
C-d to enter dired.
C-l to run ido-reread-directory to refresh the current work directory.
C-j to stop automatically completing file names. For example, you have "test.01" and "test.02" in your work directory, but you want to create a new file "test" instead of finding "test.01" or "test.02". Then you should type C-j after inputting "test", to run ido-select-text.
Or C-f to return to normal find-file.
Tab or ? to show completion help.

Don't use ido-mode to find files on ftp server, since that is quite slow and requires to type user name and password. And similarly don't search files in other directories. Add following codes into .emacs :


;; use normal find-file function for ftp files
(setq ido-slow-ftp-host-regexps '(".*"))
;; don't search files in other directories
(setq ido-work-directory-list-ignore-regexps '(".*"))


del.icio.us Tags:

No comments: