tags:

views:

536

answers:

10

Most text editors have a navigation pane that lets you see all the files you currently have open. Or a pane that lets you browse a file directory.

How do I do this in emacs?

A: 

C-x b TAB will give you an auto complete with all open buffers. Alternatively, click on the "Buffers" menu item if you are in a windowed version (not sure if there is a terminal equivalent of that).

EDIT: Also C-x C-f will let you open a file, and you can use tab for autocomplete, then tab again to view files/directories in that current directory (assuming the first tab did not autocomplete something).

Mike Stone
+5  A: 

Try Ctrl-x followed by Ctrl-b (C-x C-b) to list buffers.

A: 

Also, if you want to get rid of the list of open buffers, type C-x 1.

John, FYI, you should be able to edit your response to add additional info :-)
Mike Stone
+3  A: 

C-x C-b will open the "*Buffer List*" buffer. In that buffer, you can navigate with C-p, C-n, up-arrow, down-arrow, etc.

Browsing a directory is as simple as editing a file. Just open the directory instead of the file. On my Linux machine, "C-x C-f /tmp ENTER" opens a directory while "C-x C-f /tmp/myfile ENTER" opens a file.

Rob Adams
+2  A: 

"C-x d" accesses the directory editor. "C-x C-f" will do it as well if you give it a directory instead of a file.

There's also IBuffer mode, which lets you deal with your open buffers in a very similar fashion to Dired: http://www.emacswiki.org/cgi-bin/wiki/IbufferMode

It's included with recent versions of Emacs, so you may not have to download it separately: try M-x ibuffer first.

Allen
A: 

M-x shell opens a shell where you can browse directories

+1  A: 

If you are interested in seeing a tree like structure for your directories, sources, methods etc try using emacs code browser http://ecb.sourceforge.net/.

A: 

I often need to find another file in the "current directory", ie. the directory of the file I'm editing.

To quickly open this directory in diredit, I use:

C-x C-f C-j

Chopmo
A: 

When browsing directories with diredit, consider using "a" instead of "RET" to change directory.

Otherwise, each new directory is visited in a new buffer, which will clutter up you buffer list pretty quickly.

Chopmo
+1  A: 

M-x speedbar (speedbar website) will pop up an emacs frame that lists the contents of the current directory depending on the buffer you're in. The frame is small and stays out of the way so you can always glance at it while you're editing files. It also can filter this display based on file type using the variable `speedbar-supported-extension-expressions'. To see all the speedbar options, type M-x customize-group RET speedbar RET.

Denis Bueno