9

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 The ...


5

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: function s:init() " do your test here! endfun augroup custom_vimrc autocmd!...


5

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". Try using: Plugin 'junegunn/fzf' Plugin 'junegunn/fzf.vim'


4

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 call s:remove_triggers(name) let s:loaded[name] ...


4

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 ...


3

You could search the colorscheme file via the runtime path: let colorscheme="desert" if findfile("colors/" .colorscheme .".vim", &rtp) != "" execute "colorscheme " . colorscheme endif Another way is to work with try-catch. Thanks to D. Ben Knoble for the hint. Here is a example from his vimrc: try colorscheme dracula catch /^Vim\%((\a\+)\)\=:...


3

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 colorscheme gruvbox Usually it's done after the plug#end(). As for vim-love-docs, the GitHub code only includes the code for generating ...


2

I managed to install it. What I did was install python for neovim using pip install neovim The next thing I did was :PlugInstall YouCompleteMe 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. ...


2

(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" plug#begin('~/.vim/plugged') Plug '...' " load local plugins if filereadable($MYLOCALPLUGINS) source $...


2

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 ...


2

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 endif to check and do something when the plug exist.


2

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 ...


1

Set nocompatible 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 ...


1

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 ...


1

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 ...


1

Turns out, my vim-gtk was not compiled with Python support, the output of :echo has("python") Returned 0. Manually compiling vim with python support as listed here solved the issue.


1

@P1h3r1e3d13 Please try the following configuration For .vim.plug: " ============================================================================= " Plugin Manager Setup " ============================================================================= " filetype off " Install the plugin manager if it doesn't exist let s:plugin_manager=expand('~/.vim/...


1

From the FAQ (prettier formatting there): Conditional activation Use plain "if" statement to conditionally activate plugins: if has('mac') Plug 'junegunn/vim-xmark' endif 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, ...


1

Look at the top of $VIMRUNTIME/ftplugin/ocaml.vim -- you'll see some lines that say: if exists("b:did_ftplugin") finish endif So, put in your personal $HOME/.vim/ftplugin/ocaml.vim the line let b:did_ftplugin= 1 This will effectively prevent the system ocaml plugin from loading.


1

It's installed in the .vim/ dir, because of call plug#begin('~/.vim/plugged') try: call plug#begin('~/.config/nvim/plugged') Instead, as answered above


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