Pages

Wednesday, October 12, 2011

ido-mode and virtual buffers

Every now and again you come across something in Emacs and slap your forehead and say "why didn't I notice that before". ido-mode is one, but the setting ido-use-virtual-buffers really makes it. The concept is simple : ido-mode remembers all your past buffers so all you need to do is "C-x b" (ido-switch-buffer) and start to type the filename and ido will complete to it having remembered it from previous sessions. No need to use C-x C-f and possibly the ido find facility any more - just type the mainpart of the filename or part of it. Incredible cool time saver and very very useful.

From the Manual

ido-use-virtual-buffers is a variable defined in `ido.el'.
Its value is t
Original value was nil

Documentation:
If non-nil, refer to past buffers as well as existing ones.
Essentially it works as follows: Say you are visiting a file and
the buffer gets cleaned up by mignight.el. Later, you want to
switch to that buffer, but find it's no longer open. With
virtual buffers enabled, the buffer name stays in the buffer
list (using the `ido-virtual' face, and always at the end), and if
you select it, it opens the file back up again. This allows you
to think less about whether recently opened files are still open
or not. Most of the time you can quit Emacs, restart, and then
switch to a file buffer that was previously open as if it still
were.
This feature relies upon the `recentf' package, which will be
enabled if this variable is configured to a non-nil value.


my ido settings are currently:-

 '(ido-create-new-buffer (quote never))
'(ido-enable-flex-matching t)
'(ido-enable-last-directory-history nil)
'(ido-enable-regexp nil)
'(ido-max-directory-size 300000)
'(ido-max-file-prompt-width 0.1)
'(ido-use-filename-at-point (quote guess))
'(ido-use-url-at-point t)
'(ido-use-virtual-buffers t)

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete