There are a few questions intertwined -- I hope I convey my intentions well enough so that someone understands where I'm confused and what I'm trying to do. I apologize ahead of time for the chaotic state of this post.
I have neovim installed via homebrew (OSX/macOS).
I plan to use nvim
exclusively as a replacement for vim
, and I plan to utilise gvim
once I sort out this confusion.
The directory /usr/local/Cellar/neovim/0.1.7/share/nvim/runtime
contains an autoload
directory amongst much more:
├── autoload/
├── bugreport.vim
├── colors/
├── compiler/
├── delmenu.vim
├── doc/
├── filetype.vim
├── ftoff.vim
├── ftplugin/
├── ftplugin.vim
├── ftplugof.vim
├── indent/
├── indent.vim
├── indoff.vim
├── keymap/
├── macmap.vim
├── macros/
├── makemenu.vim
├── menu.vim
├── mswin.vim
├── optwin.vim
├── pack/
├── plugin/
├── print/
├── scripts.vim
├── synmenu.vim
├── syntax/
├── tutor/
└── vimrc_example.vim
When installing vim-pathogen, the installation leads you to create the directories autoload
and bundle
within the ~/.vim
directory.
I see that there are many important vim files in the runtime
directory. I want to avoid redundancy as much as possible.
Would it be more efficient to symlink one/more of the directories in ~
to the runtime
directory - or perhaps one/more of its subdirectories?
When installing vim plugins and other vim files to the config directory in my home directory, should I ensure that the same plugin files aren't located in both homebrew's autoload
directory and ~/.vim/autoload
? In other words, do I need to verify beforehand that a particular vim file isn't already located in homebrew's runtime
directory for nvim
before installing said vim file in ~/.vim/
? Would it be more efficient to install all files in ~/.config/nvim
instead of ~/.vim
?
Should I modify the execute pathogen#infect()
line in my .vimrc
to reflect the runtime (or some other) directory?
I have /usr/bin/vim
but not vim
from homebrew. Would it make things easier if I installed homebrew's vim
installed? This is something I eventually plan to do.
With syntax on
in my .vimrc
I receive this error every time I launch vim
or nvim
:
Can't open file /usr/bin/vim/syntax/syntax.vim
Yet syntax.vim
exists within the runtime
directory for nvim
mentioned above.
What I have done so far:
Per here I have
mkdir ~/.config ln -s ~/.vim ~/.config/nvim ln -s ~/.vimrc ~/.config/nvim/init.vim
In attempt to troubleshoot, I've started with a new
.vimrc
that containsexecute pathogen#infect() syntax on filetype plugin indent on
pathogen.vim
is the only file located within~/.vim/autoload
Variable
EDITOR
is set tonvim
in.bash_profile
I've reviewed this question.
With .vimrc
containing only the three lines above, I get the following errors when I run vim
and nvim
, respectively:
vim
Error detected while processing /Users/user/.vimrc:
line 2:
E484: Can't open file /usr/bin/vim/syntax/syntax.vim
Press ENTER or type command to continue
nvim
Error detected while processing /Users/user/.config/nvim/init.vim:
line 1:
E117: Unknown function: pathogen#infect
E15: Invalid expression: pathogen#infect()
line 2:
E484: Cannot open file /usr/bin/vim/syntax/syntax.vim
Press ENTER or type command to continue
The ultimate question isn't necessarily surrounding vim-pathogen
, but rather trying to find a sound way to understand and manage all configurations (including directories) between vim
, nvim
, gvim
, etc.
I sincerely appreciate any help.