emacs_tutorial/doc/ido.org
2023-07-19 11:32:38 -03:00

1.6 KiB

Ido mode

'Ido mode' stands for "interactively do". It's a package of emacs used to switch between buffers and find (open or create) files.

To activate the mode you may use 'M-x' (keys: "Alt" + "x" ):

  • M-x ido-mode: initializes ido for one emacs session.

To activate ido for every emacs session, you may include the following in the emacs initialization file (e.g., .emacs, .emacsd/config.org ):

  (require 'ido)
  (ido-mode t)

Open files and visit other buffers

After activating ido using the keybindings 'C-x + C-f' will execute the function 'ido-find-file'.

Also, using 'C-x' and then 'b' will open options to visit any open buffer in the session.

Note that visiting a file with ido (C-x C-f) will search for the name of the file everywhere, wich can be annoying if you want to create files with the same name in different directories.

To avoid this behavior, you may use 'M-x ido-find-file-in-dir' to precisely indicate the place where you want to create the new file.

If you use 'C-x C-f' you may use 'C-j' after to avoid emacs visit a file with the same name, and instead create a new file.