Question

I use gVim with Janus. Fantastic. Now I want to improve and change this environment, so it is more suited for PHP (Drupal) development.

I prefer to do this in an entirely separated environment. Many plugins and vimrc entries will problably be duplicated across these environment, but a lot will need slight modification or are unneccesary in one of both environments. E.g. most of rails.vim is not needed in the drupal vim environment. While Xdebug setup is only usefull for PHP development. There will probably be more such environments: like writing latex, Blogging, presentations etceteras.

I don't mind running a command or script before starting to develop, in order to switch between Rails, Drupal and other environments.

I have looked at pathogen, but that seems to only allow "install plugins and runtime files in their own private directories. ", while I am looking for a way to have the plugins and runtime files bundled into separate environments and directories.

As such, I would like to fork Janus and start modify-ing for Drupal development.

The simplest solution I see, is to introduce different .vim.somename directories with their own content and switch a symlink: rm ~/.vim && ln -s ~/.vim.somename ~/.vim.

Will this work with Vim? Will this work with Janus? Is there a better approach?

Was it helpful?

Solution

See :help initialization. You can use the -u switch to have different vimrcs. In those vimrcs you can set different runtimepaths (:help 'rtp').

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