Question

I have just made the switch from Textmate to MacVim and so far I am loving it! My workflow is just becoming a breeze… and I'm kinda hooked on that.

As front-end developer working on Rails projects I find that I am constantly opening up the same folders in the projects (app/assets/javascripts|stylesheets & app/views & specs).

I was wondering if there was a way to set shortcuts to open up these folders in NerdTree? I've looked into Bookmarks but these seem absolute paths - I'd like default relative paths for all the Rails projects I work on. Is this possible?

Thanks, Ad

Was it helpful?

Solution

There is no default way to do this in NERDTree. It is probably possible, but it would require a custom script to do what you're describing. I'm sure you can get help developing that if you look for it, but I'm betting it will be hard to find something that already does this.

You can, however, check out https://github.com/tpope/vim-rails/, which as far as I know is the de facto standard for Rails development in Vim. It'll probably cut down on your need to use NERDTree to navigate files at all, because you can jump through related files quickly with other commands.

As romaini mentioned, bookmarks are also very handy. Make a bookmark for the top-level of a Rails project, open something, use vim-rails techniques to navigate related files, you'll get what you need.

OTHER TIPS

Did you try the project plugin?

NERDTree stores bookmarks in a very simple file. Creating one such file for every project and pointing NERDtree to it may solve the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top