Various Vim environments: individual plugins, vimrc, etc.

I am using gVim with Janus . Fantasy. Now I want to improve and change this environment, so it is more suitable for developing PHP (Drupal).

I prefer to do this in a completely isolated environment. Many vimrc plugins and entries will probably be duplicated in these environments, but many will need minor modifications or some other situation is not necessary. For instance. most rails.vim is not needed in drupal vim. Although Xdebug configuration is only useful for PHP development. There will probably be more of these environments: for example, writing latex, blogs, presentations, etc.

I don’t mind running a command or script before starting development to switch between Rails, Drupal and other environments.

I looked at the pathogen, but this seems to allow you to β€œinstall plug-ins and runtime files into your own directories.”, While I'm looking for a way to add plug-ins and runtime files to separate environments and directories.

So, I would like to develop Janus and start modifying for Drupal development.

The simplest solution that I see is to enter different .vim.somename directories with their contents and switch the symbolic link: rm ~/.vim && ln -s ~/.vim.somename ~/.vim .

Will it work with Wim? Will this work with Janus? Is there a better approach?

+4
source share
1 answer

See :help initialization . You can use the -u switch to have different vimrc s. In these vimrc you can set different runtimepath ( :help 'rtp' ).

+6
source

Source: https://habr.com/ru/post/1380383/


All Articles