7

I've read that pathogen works on nvim, i tried to follow the vim installation process:

mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

Changing the .vim/bundle part:

mkdir -p ~/.vim/autoload ~/.local/share/nvim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

my init.vim is:

execute pathogen#infect()
set guicursor=
set clipboard+=unnamedplus

when i launch nvim i get:

E117: unknown function: pathogen#infect()
E15: invalid expression: pathogen#infect() 
11

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 ~/.vimrc ~/.config/nvim/init.vim 

~/.local/share/nvim/init is also part of 'runtimepath', so if you wanted to keep plugins separate from your personal config, that would be an alternate place to put the bundle directory.

  • Thank you for your answer, I was copying/pasting stuff and I did not changed everything I needed on the commands. However, I will not mark this answer as the solution, because in order to get pathogen you need to put the autoload folder inside ./config/nvim github.com/tpope/vim-pathogen/issues/50. Obs: I'm loving neovim, thank you for your work. – Renato Ferreira Feb 1 '18 at 16:58
  • This time it's my fault for not reading close enough. :) ~/.local/share/nvim/site is part of 'runtimepath', not ~/.local/share/nvim. Either ~/.local/share/nvim/site/{autoload,bundle} or ~/.config/nvim/{autoload,bundle} can be used. I'll update the answer. – jamessan Feb 1 '18 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.