19

You can do this with Vim-Plug. See the README: " On-demand loading Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } Plug 'tpope/vim-fireplace', { 'for': 'clojure' } I think you'll have to use :set filetype whatever instead of set syntax whatever to enable the plugin. (Some other plugin manager might allow you to do that, see What is the difference ...


13

mkdir -p ~/.vim/autoload ~/.local/share/nvim/bundle This is wrong for Neovim. ~/.config/nvim is the replacement for ~/.vim. mkdir -p ~/.config/nvim/autoload ~/.config/nvim/bundle is what you should use. If you want to your config to work with both Vim and Neovim, then I would recommend symlinks. mkdir -p ~/.config/ ln -s ~/.vim ~/.config/nvim ln -s ~/....


9

Instead of calling execute pathogen#infect() to load all plugins, call pathogen#interpose for every plugin, i.e.: execute pathogen#interpose('bundle/unicode.vim') execute pathogen#interpose('bundle/AnsiEsc.vim') The pathogen API isn't documented outside of the source, but it's simple enough (even though the function names are obscure and non-descriptive). ...


6

Pathogen is not a plugin manager at all. Updating your plugins is your job and the best method depends entirely on how you installed those plugins. If you want an actual plugin manager, try Neobundle, Vundle, Plug, etc.


6

pathogen manages the run time path of Vim. It is not the same as vim-plug nor vundle. The differences between the vim plugin managers has many good answers. :-) How to use Tim Pope's Pathogen was created by romainl who has a lot of reputation on this site. I hope that helps.


4

Using git submodules is a common way of doing this. The VimCasts episode is a great explanation, but the basic commands are as below: Adding a new plugin cd ~/.vim git submodule add http://github.com/<username>/<pluginname>.git bundle/<pluginname> git add . git commit Updating a plugin Git submodules are also repositories in their own ...


4

The problem is that there are various scenarios in which Vim will reload the colour scheme such as using :colorscheme or :syntax enable. Colour schemes should always start with :highlight clear to clear all existing highlight groups. Why? See what happens when you do: :highlight Test ctermfg=red :highlight Test ctermbg=blue What is Test now set to? To ...


2

I don't know where your autoclose.vim comes from, but let say you use this version. As Alexander Batischev said, your plugin must be put in the plugin (or autoload) directory. You should just be fine by running a git clone ... or a copy/paste (inside the bundle folder) if your plugin respect this architecture. All plugin managers I know works the same ...


2

Vim plugins are, traditionally, just a set of files you copy into your ~/.vim/. Since Vim looks for different things in different places (~/.vim/autoload/ for plugins to load on start, ~/.vim/plugin/ for things to load on-demand, etc.), plugins themselves follow the same file hierarchy. On installation, plugins are just copied over your existing ~/.vim/, and ...


2

I have tried the submodule approach and ... I ended up switching to vim-plug. This is essentially what Vundle, vim-plug etc. do: you provide a list of plugins (or repositories), and Vundle/vim-plug provides you functions or commands to install/update them all. My current setup is like this: things in ~ in one repo, with a submodule or two for zsh plugins ...


2

As I don't know where to find the "written" rules, I digged into the source code instead. Also note that there are both Vim and Neovim, but it looks that they still share almost the same code in this regard, so the following applies to both. Also, let me remind that there is rtp-order and load-order, and they are different, as it becomes clear from ...


1

It seems to me that the issue you're having is that your plug-in manager is correctly loading the YouCompleteMe plug-in, however it's not working right after being installed by the plug-in manager because the external steps required by YouCompleteMe are not completed yet. So I'm going to go ahead and strongly recommend you switch from Vundle to vim-plug as ...


1

UPDATE: It looks like you were trying to get help on plug-ins. For that, you can simply call :help. Vim will look for help files in the plug-in directories, so something like :help pymode will work. If you build the help tags for plug-ins (for instance, with the :Helptags command of pathogen, or :helptags ALL if you're simply using packages), then the ...


1

Does "/usr/share/vim/doc/" exist on your Windows system? Is Vim looking for a path that isn't there?


1

A bit of investigation After finding the function in source file, with these lines preceding it: if !has('python') echo "Error: Required vim compiled with +python" finish endif And installing the plugin (my Vim is built without python), I can easily get the same error: Error detected while processing BufEnter Auto commands for "<buffer=1>": ...


1

You can setup whole Vim directory inside ~/.dotfiles/vim and do a symlink ~/.vim -> ~/.dotfiles/vim This way you will have all the plugins as submodules (including Pathogen) inside ~/.dotfiles/vim/bundle. To handle Pathogen, create a link ~/.dotfiles/vim/autoload/pathogen.vim -> ~/.dotfiles/vim/bundle/<path to pathogen.vim>


1

As other answers point out, Pathogen manipulates the Vim runtime directories rather than managing plugins. I use Git to manage changes to my Vim configuration files (living in ~/.vim). Each of my plugins (including Pathogen itself) is installed into ~/.vim/bundle directory as Git sub-modules. This allows me to to use git submodule to pull in all changes ...


1

Pathogen will not manage (update, install, etc.) your plugins for you. You have to do that yourself. And a good way to do that yourself is to install plugins simply by cloning their Git repos to the ~/.vim/bundle folder. Then you can update them with one-line loops. For example in Bash you could do this: for i in ~/.vim/bundle/*; do git -C $i pull; done ...


1

Run :Helptags after installing a new package. Then :help vimtex works.


1

OK. I am answering it so that others who make the same mistake can correct it. If the format you are trying to Ctrl-A Ctrl-X on is not defined in :SpeedDatingFormat it will not work. Otherwise it should. In my case, there was a small error in the format.


1

Solved - restore all vimrc files except for the one in ~/.vimrc to their defaults.


Only top voted, non community-wiki answers of a minimum length are eligible