2

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

bbedit-tray

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**                                   *
************************************************

3 Answers 3

3

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.

1
  • @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, 2012 at 20:45
4

Maybe you can use the The NERD tree script

nerd tree script on vim.org

1
  • 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, 2012 at 18:47
2

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .