Installing Plugins in gvim on Windows 8 - vim

I seem to have put the EasyMotion plugin in the correct location, but now there's an error loading it... I downloaded "Lokaltog-vim-easymotion-1.3-0-g667a668.zip" from [here][1].
I had previously put EasyMotion.vim in $HOME/vimfiles/plugin, which was giving the following error message:
>Error detected while processing C:\Users\Willem\vimfiles\plugin\EasyMotion.vim:
>line 24:
>E117: Unknown function: EasyMotion#InitOptions
>line 39:
>E121: Undefined variable: g:EasyMotion_hl_group_target
>E116: Invalid arguments for function EasyMotion#InitHL
>line 40:
>E121: Undefined variable: g:EasyMotion_hl_group_shade
>E116: Invalid arguments for function EasyMotion#InitHL
>line 69:
>E117: Unknown function: EasyMotion#InitMappings
I now realize that there are two files and have gotten it working! As per the first answer, I have now moved autoload/EasyMotion.vim into $HOME/vimfiles/autoload, as well as moving plugin/EasyMotion.vim into $HOME/vimfiles/plugin

It looks like you have forgotten to install everything.
More precisely, the autoload/EasyMotion.vim file is supposed to go in $HOME/vimfiles/autoload/ and the doc/easymotion.txt file is supposed to go in $HOME/vimfiles/doc/.

You might want to use pathogen to help you with your plugins.
Once you have installed pathogen and activated it in your _vimrc, installing a plugin can be as simple as unpacking it in $HOME\vimfiles\bundle and restarting vim.

Related

gVim error on startup: E121: Undefined variable: paste#paste_cmd

In gvim 8.1.1401 on Debian 10.4 when I open a file from Thunar with Right-click -> Open With -> Open with "gVim"
I have been getting an error popup:
Error
Error detected while processing /usr/share/vim/vim81/menu.vim:
line 166:
E121: Undefined variable: paste#paste_cmd
[OK]
When I open the same file from the command line with gvim /path/to/file it doesn't happen.
I don't get it launching normal vim from the command line either.
I tried uninstalling and re-installing all of my vim packages, in case it was picking up incompatible files from an old version. This didn't help.
I googled for the error and found various clues:
https://bugs.debian.org/388488
https://bugs.debian.org/520360
https://groups.google.com/d/topic/vim_use/x4R_QF-MXnE/discussion
GVIM - undefined variable: paste#paste_cmd?
They pointed me in the right direction to find it, i.e. an invalid runtimepath in ~/.vimrc, but were not the exact same error and didn't detail the solution I discovered.
By editing my ~/.vimrc and trying different things I tracked down the cause.
Because I couldn't find the answer online I'm sharing it here.
If you have:
set runtimepath=
in ~/.vimrc AND if that line does not include /usr/share/vim/vim81
then you will get the error.
If you don't have a ~/.vimrc you won't get the error.
If you don't have a runtimepath= entry you won't get the error.
If ~/.vimrc has a runtimepath= entry and it includes /usr/share/vim/vim81 in the path, then you won't get the error.
If this is still an issue in future versions of vim after 8.1 which doesn't have the vim81 directory, then the numbers will need to be updated to point to a valid directory for that version e.g. vim82 (or later)
NB: If the runtimepath in ~/.vimrc is correct, but vim81/autoload/paste.vim does not exist you will also get the error.
If vim81/autoload/paste.vim does exist, but the paste_cmd is commented out/deleted/corrupted, you will get the error (and an instance of it from each entry in vim81/autoload/paste.vim and any other files which refer to paste_cmd)
I hope this saves people time and prevents frustration!

neovim on windows with FZF

I am using neovim-qt on windows. I have install fzf with help of Scoop package manager on windows.
All the required plugins for neovim are installed using vim-plug and list under a file called _plugrc. (Other plugged plug-ins are working without any issue. _plugrc is included in init.vim)
I configured FZF recently. The FZF installation is done using following lines
" FZF
Plug 'C:/Apps/Packages/Scoop/apps/fzf/current'
Plug 'junegunn/fzf.vim'
My intention is to use fzf binary on windows along with fzf.vim. Neovimo issues and error whenever I invoke 'Files' command in neovim.
Error:
Error detected while processing function fzf#vim#files[15]..<SNR>91_fzf[18]..<SNR<91_wrap:
line 12:
E117: Unknown function fzf#wrap
E15: Invalid expression: fzf#2wrap(a:name, opts, a:bang)
line 14:
E121: Undefined variable: wrapped
E15: Invalid expression: wrapped
Error detected while processing function fzf#vim#files[15]..<SNR>91_fzf:
line 18:
E117: Unknow fucntion: fzf#run
E15: Invalid expression: fzf#run(s:wrap(a:name, merged. bang))
I think it is unable to use the scoop install FZF. Help me to configure it.
Following #filbranden advice, this it what is required:
Goto C:\Users\YOUR_USER_NAME\scoop\apps\fzf\XXXXX
Create the dir plugin
Place within it fzf.vim from https://github.com/junegunn/fzf/blob/master/plugin/fzf.vim
BUT!!! It's much easier to rather just add:
Plug 'junegunn/fzf' to your init.vim to plug the above file (i.e. in addition to Plug 'junegunn/fzf.vim')

Can not get delimitmate to work in vim

I am trying to use delimitmate plugin but when I run vim I get:
Error detected while processing function <SNR>26_DelimitMateDo..<SNR>26_init..<SNR>26_option_init..<SNR>26_s:
line 1:
E117: Unknown function: delimitMate#Set
E117: Unknown function: delimitMate#Set
Error detected while processing function <SNR>26_DelimitMateDo..<SNR>26_init..<SNR>26_g:
line 1:
E117: Unknown function: delimitMate#Get
Error detected while processing function <SNR>26_DelimitMateDo..<SNR>26_init..<SNR>26_option_init..<SNR>26_s:
line 1:
E117: Unknown function: delimitMate#Set
Error detected while processing function <SNR>26_DelimitMateDo..<SNR>26_init..<SNR>26_g:
line 1:
E117: Unknown function: delimitMate#Get
Error detected while processing function <SNR>26_DelimitMateDo..<SNR>26_init:
line 8:
E712: Argument of filter() must be a List or Dictionary
delimitMate: each member of a pair in delimitMate_matchpairs must be different from each other.
line 11:
E712: Argument of map() must be a List or Dictionary
E714: List required
delimitMate: invalid pairs: 0
What am I messing up?
It looks like you have the ~/.vim/plugin/delimitMate.vim script, but not the corresponding ~/.vim/autoload/delimitMate.vim script. Depending on how you installed the plugin (unpack zip, VimBall, clone repository with Pathogen, install with Vundle etc.), you need to reinstall the entire plugin.
Though small and simple plugins just contain of a single script (to be placed in the plugin/ config subdir), many plugins separate parts of the functionality into modules which are loaded on-demand, improving Vim's footprint and startup time. The module mechanism (introduce with Vim 7.0) is called autoload; cp. :help autoload. Those additional scripts must be placed in the proper autoload/ config subdir for the plugin to work.

fuzzyfinder: Error detected while processing function <SNR>19_onCommandPre

When typing an command, I get an error like this:
:w
Error detected while processing function <SNR>19_onCommandPre..fuf#mrucmd#onCommandPre..<SNR>25_updateInfo..fuf#updateMruList:
line 2:
E121: Undefined variable: word
line 5:
E121: Undefined variable: word
Is it a bug or just cause by my incorrect configuration?
I set let g:fuf_modesDisable=[] in my .vimrc.
And the vim version I use if vim 7.3, the fuzzyfinder version is fuzzyfinder 4.2.2
I had the same (or very similar) problem. I've filed issues against FuzzyFinder.
If you follow the link you will find the details of my investigation together with solution.
If nothing else work I believe that wiping out ~/.vim-fuf-data directory will do. But better to try what is described in the issue first (~/.vim-fuf-data/mrufile/items).
I encountered the same error. Deleting the FuzzyFinder data file fixed the issue for me. Of course I am starting from scratch now, but it works!
Delete the following:
~/.vimfuzzyfinder
Just doing a plugin install seemed to fix the issue for me

fuzzyfinder not working in gvim

I found out about fuzzyfinder yesterday and tried installing it. Then found out I needed L9 since that is a prerequisite for fuzzyfinder.
I am getting the following errors when running gvim:
Error detected while processing /usr/share/vim/vim72/plugin/fuf.vim:
line 13:
***** L9 library must be installed! *****
Error detected while processing /usr/share/vim/vim72/plugin/l9.vim:
line 8:
E117: Unknown function: l9#guardScriptLoading
E15: Invalid expression: !l9#guardScriptLoading(expand('<sfile>:p'), 702, 0, [])
line 16:
E117: Unknown function: l9#defineVariableDefault
I've put fuf.vim and l9.vim into my plugin folder. I tried putting them in autoload folder as well but that fetches even more errors.
My version is: VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Apr 16 2010 12:40:58)
Googling did not work since question from one mailing list is spread of so many other links and the answer is nowhere to be found.
Both fuzzyfinder and l9 plugins contain more then one file. They must not work if you have thrown away most of them (and you did if you put just fuf.vim and l9.vim). You are supposed to unpack plugin archives into ~/.vim.
By the way, you may try to use vim-addon-manager. Copy the following into your shell and you should get FuzzyFinder successfully installed with an advantage of having each plugin in a separate directory and easier installation of plugins with dependencies in future:
mkdir -p ~/.vam
git clone git://github.com/MarcWeber/vim-addon-manager ~/.vam/vim-addon-manager
echo 'set rtp+=~/.vam/vim-addon-manager' >> ~/.vimrc
echo 'call vam#ActivateAddons(["FuzzyFinder"])' >> ~/.vimrc
vim # Now answer yes on all queries
While this is correct the VAM team proposes reading the official documentation about how to install VAM which can be found at github.com/MarcWeber/vim-addon-manager then cd into the doc directory.
We want to be fair and say that VAM is only one solution. Vundle, Pathogen, ... and some more exist (See related work section in docs of VAM)

Resources