neovim version 0.1 has breaking changes. It uses directory ~/.config/nvim
(On Mac OS X. Linux or Windows may use slightly different paths.)
If you want your neovim configuration independent of vim configuration,
you can rename .nvimrc to ~/.config/nvim/init.vim (See the docs here and here).
Install vim-plug to ~/.config/nvim/autoload/plug.vim
You've installed the fzf.vim wrapper plugin, but you haven't installed the base fzf plugin, which provides the underlying functionality, including the autoload functions that the error messages are flagging as "Unknown".
Choosing between plugin/ and autoload/ is a matter of how a plugin designer intends the plugin to be used. vim-plug is intended to be placed in autoload/ because it is initialized through functions named plug#[...]. vim-plug is not loaded and does nothing until you call one of these functions. This is a better practice than using plugin/ because if the ...
The problem is, your vimrc file is executed before any plugins are loaded. You can check the order of what source files are loaded by issueing the :scriptnames command.
The usual way to fix this problem is to execute the test inside a VimEnter autocommand, something like this:
" do your test here!
I managed to install it.
What I did was install python for neovim using
pip install neovim
The next thing I did was
from within neovim and it started installing as it normally does (if you have all the usual YCM dependencies installed).
My .nvimrc still had the section for YCM in it and I guess vim-plug still uses those.
In my understanding, that example creates a User autocommand named YouCompleteMe which will be fired by vim-plug itself, in order to load the plugin on demand. If I'm not mistaken, here's the place where vim-plug will run the custom autocommand:
function! s:lod(names, types, ...)
for name in a:names
let s:loaded[name] ...
So your question has already been asked in vim-plug's issue tracker, see #905.
@raindev said this (I changed the link to the code to not use master in case the code changes in the future):
I don't think that will work currently as each call to plug#begin resets Plug configuration (and not appends to it):
You could search the colorscheme file via the runtime path:
if findfile("colors/" .colorscheme .".vim", &rtp) != ""
execute "colorscheme " . colorscheme
Another way is to work with try-catch. Thanks to D. Ben Knoble for the hint. Here is a example from his vimrc:
You can get all plugs from g:plugs_order list or g:plugs dict.
g:plugs's value also contain useful config infomation about the plug. Like dir where the plug is installed.
So, you can use:
if has_key(g:plugs, "name")
" do something
to check and do something when the plug exist.
My guess is that you haven't activated the plug-ins. In the rainbow case you should add
let g:rainbow_active = 1
to your init file (Neovim's one is located in ~/.config/nvim/init.vim). In case of gruvbox you should add
Usually it's done after the plug#end().
As for vim-love-docs, the GitHub code only includes the code for generating ...
Look at the top of $VIMRUNTIME/ftplugin/ocaml.vim -- you'll see some lines that say:
So, put in your personal
let b:did_ftplugin= 1
This will effectively prevent the system ocaml plugin from loading.
(I haven't tested this)
You could use another local file, that contains exclusively Plug ... commands. The main vimrc would load this, inside the plug#begin - plug#end section. Something like:
let $MYLOCALPLUGINS = $HOME . "/.local.plugins.vim"
" load local plugins
For whatever reason it doesn't seem to see VimPlug with the first symbolic link I had in my post. This is the only plugin I couldn't get to work in neovim with it.
So instead of making a symbolic link of ~/.vim to ~/.config/nvim. I decided to make a symbolic link of ~/.vim to ~/.config/ (note that I'm truncating the nvim part).
So in terminal that will ...
From the FAQ (prettier formatting there):
Use plain "if" statement to conditionally activate plugins:
The caveat is that when the condition is not met, PlugClean will try to remove the plugin. This can be problematic if you share the same configuration across terminal Vim, ...
As noted in the comments, you can use Vimscript within the vim-plug block, so I ended up checking for particular commands to control installation of plugins. For example, I rarely have cmake installed, I usually install it for YCM. So a executable('cmake') check is good enough for that. Now, my vim-plug block has one section for common plugins, and a set of ...
Checking the output of filter helped diagnose the problem, my vimrc also contained the following line:
" If installed using Homebrew
which referred to a program (fzf) that wasn't installed but also couldn't be installed by vim-plug. Installing it properly fixed the problem.
Looks like you created the autoload directory (or ran the wget command to install vim-plug) under sudo.
Running it under sudo will be bad because it will create files and directories that only root will be able to access!
To fix that now:
$ sudo chown -Rh gabe:staff ~/.vim
$ chmod -R a+rX,u+w,go-w ~/.vim
This should reset the ownership of all the files ...
First we need to resize a split window vertically :h :vertical-resize tells us that from the command line mode we can use
:vertical resize 50
Or we could also use :50wincmd | but I find that less readable. The wincmd command allows to execute from the command line the commands relative to windows that you would execute in normal mode with ctrl+wany ...
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 ...
These lines define special remappings, so I think it makes sense that they are called on startup time and not via an autocmd.
Note that there's a specific autocmd event which is essentially for "startup time", but after plugins were loaded and executed, which is the VimEnter event.
From :help VimEnter:
VimEnter: After doing all the startup stuff, ...
I cleaned out the installation and pulled the zip of vim-plug. Extracted the files into the autoload folder in vim82. Before I used the powershell solution.
After that I made a custom plugin folder and gave it read/write permission.
Now it seems to work. Unsure what the issue was but these are the things that I changed. Also I should have mentioned that I ...
When you use a separate vimrc through the -u command-line flag, the nocompatible option will not be automatically set, as it is when using the normal user vimrc file.
See :help compatible-default for more details.
You should either add set nocompatible to the top of your alternative vimrc file, or pass Vim the -N command-line option in ...
As posted in the comments:
You have a file where vim-plug wants to create a directory
Create a back up and get it out of the way:
mv ~/.vim/plugged ~/.vim/plugged.bak
Then try again.
Also make sure you own the directory:
sudo chown $USER: ~/.vim
The vim directory can become owned by root if you use sudo vim—the correct technique is to set the ...
If you installed the plugin with vim-plug, then all the files from the plugin will be located at ~/.vim/plugged/<NAME>. You can just modify these files, and test the changes (re-source the modified files or simply restart vim). This way you don't need to interact at all with vim-plug or with the Github fork.
Since ~/.vim/plugged/<NAME> contains ...
@P1h3r1e3d13 Please try the following configuration
" Plugin Manager Setup
" Install the plugin manager if it doesn't exist