I've recently started to really appreciate the power of VIM. Once you learn how to use it, coding and editing go a lot quicker. My main holdup is that I can't open a directory like a project in VIM, which BBEdit (Mac) does so wonderfully. Are there any plugins or extensions that can make VIM do this?

BBEdit's functionality


This is a pane displayed to the left of the file editor. You can easily switch back and forth between open documents and you don't have to save them to switch. An ASCII Art example of what the editor window looks like is

* Project **                                   *
*---------**                                   *
* File    **                                   *
* File2   **                                   *
* Dir     **                                   *
*  |- File**                                   *

See :help netrw. Netrw is a 3rd party plugin distributed with Vim that allows you to do many things including local file navigation.

You can do :Ex or :Hex or :Vex to open a new horizontal or vertical window containing an interactive listing of the current directory. :Ex /path/to/direcory opens a listing of /path/to/directory and you can use command line completion and "globs" to make it easier and quicker: :Ex *foo<Tab> or :Ex /**/bar<Tab>.

In conjunction with set hidden and set autochdir you can go a long way.

You could also try the aforementioned NERDTree which is the closest equivalent of what you want in Vim land. Its featureset is smaller than netrw's but its behavior is more in line with other more classical file drawer implementations.

However, neither Vim nor netrw nor NERDTree really have the concept of "project" so you may be interested in Project.vim which goes a few steps further.

That said, I actually hated that concept even before I switched to Vim. I find plugins like FuzzyFinder, LustyExplorer, Command-T or CtrlP (my favorite) a lot more useful.

  • @wmarbut: It's not obvious from the option name, but the recommendation to use set hidden above is in answer to your "you don't have to save them to switch" comment. See :help 'hidden'. – garyjohn Aug 31 '12 at 20:45

Maybe you can use the The NERD tree script

nerd tree script on vim.org

  • This looks useful, but I'm not quite sure it will fill the gap for me. I'll play with it later to be sure. Thanks! – wmarbut Aug 31 '12 at 18:47

GVim on Windows has a normal windows File Open dialogue that shows navigable folders.

In any Vim you should be able to use :Ex for a text mode equivalent that allows you to navigate folders.

If (as I suspect) this doesn't answer your question, please update your question to explain BBEdit's feature in more detail for those of us unfamiliar with BBEdit.

  • Thanks for the answer and the suggestion. I've clarified a little bit hopefully – wmarbut Aug 31 '12 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.