fuzzyfinder not working in gvim - vim

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)

Related

vim Error detected while processing function <SNR>66_MRU_Select_File_Cmd

I use vim8. When I use vim, whether I open or save a file, there will be errors. To save a file, I must use: w!, Open the file must be q to close the error.
Error detected while processing function <SNR>66_MRU_Select_File_Cmd[21]..<SNR>66_MRU_Window_Edit_File[67]..BufRead Autocommands for "*"..function <SNR>25_Detect[17]..<SNR>25_BufInit[1]..<SNR>25_autoload[2]..script /root/.vim/bundle/vim-rails/autoload/rails.vim[169]..function <SNR>87_add_methods[2]..<SNR>87_function:
I tried to reinstall vim, but it didn't work
sudo apt remove vim
sudo apt install vim
Also try to modify the .vimrc file and copy the .vimrc file of vim that is normally used on other servers, but it doesn't work
I also tried to add the content shown in the answer here to the top of the file, but it still failed https://github.com/powerline/powerline/issues/1925
if has('python3')
silent! python3 1
endif
and i tried the solution here, but it still failed Error detected while processing function vundle#installer#new
set shell=/bin/bash
Then I tried the solution here, but it still didn't work https://github.com/vim/vim/issues/3117
mv ~/.vimrc ~/.vimrc_back
mv ~/.vim ~/.vim_back
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
cp ~/.vim/bundle/Vundle.vim/test/minirc.vim ~/.vimrc
What should I do so that vim can be used normally and no error will be reported
When a script is sourced by Vim it is given a number, which can be used to make sense of a stack trace like yours (edited for legibility):
Error detected while processing function <SNR>66_MRU_Select_File_Cmd[21]
..<SNR>66_MRU_Window_Edit_File[67]
..BufRead Autocommands for "*"
..function <SNR>25_Detect[17]
..<SNR>25_BufInit[1]
..<SNR>25_autoload[2]
..script /root/.vim/bundle/vim-rails/autoload/rails.vim[169]
..function <SNR>87_add_methods[2]
..<SNR>87_function:
Before reinstalling Vim, a more constructive approach would be to figure out whether the problem occurs in Vim's own runtime files or in yours. You can use :help :scriptnames to put a filename to those numbers, so to speak.
Without even seeing the output of that command, it doesn't take much effort to find out that at least some of your problems come from your runtime files:
" one plugin
<SNR>66_MRU_Select_File_Cmd[21]
<SNR>66_MRU_Window_Edit_File[67]
" another plugin
..script /root/.vim/bundle/vim-rails/autoload/rails.vim[169]
..function <SNR>87_add_methods[2]
..<SNR>87_function:
Which means that you should look for the actual cause, not throw the towel and reinstall Vim or try random answers to random unrelated questions.
One good starting point would be line 21 of function MRU_Select_File_Cmd() in script number 66, which should be a call to MRU_Window_Edit_File() in your outdated version. The stack trace then points to line 67 of that function, and so on.
Hypotheses:
badly installed plugins,
incompatible Vim version,
incompatible plugins,
options incompatible with your plugins,
etc.
Good luck.

Error when loading vimtutor "E484: Can't open file /usr/share/vim/vim80/tutor/tutor.vim"

I'm trying to run vimtutor on openSUSE Leap 15 1 on WSL2. I get the error E484: Can't open file /usr/share/vim/vim80/tutor/tutor.vim
When I run which vim (or which vimtutor) I get /usr/bin/vim (or /usr/bin/vimtutor) -- is the issue that I have multiple versions of vim installed and when I try vimtutor (which I understand to be a script) it can't access the correct one because of the way my PATH is configured? I've seen similar issues about this posted, but none that seem to deal with this specific issue as it applies to vimtutor.
The vim script is part of vim-data package.
If you looked at the spec file linked here,
https://build.opensuse.org/package/view_file/openSUSE:Factory/vim/vim.spec?expand=1
on line 567, the tutor.vim is split into the vim-data package.
It's part of the
%files data
block.

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!

Valloric/YouCompleteMe plugin for Vim

After installing the Valloric/YouCompleteMe plugin via Vundle I get the following error when I start up vim. I had no issues running the ./install.py script.
File "<string>", line 19, in <module>
File "/Users/simonorlovsky/.vim/bundle/YouCompleteMe/autoload/../python/ycm/setup.py", line 37, in SetUpSystemPaths
from ycmd import server_utils as su
File "/Users/simonorlovsky/.vim/bundle/YouCompleteMe/python/ycm/../../third_party/ycmd/ycmd/server_utils.py", line 25, in <module>
import io
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/io.py", line 51, in <module>
import _io
ImportError: dlopen(/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
Referenced from: /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
Expected in: flat namespace
in /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
YouCompleteMe unavailable: dlopen(/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
Referenced from: /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
Expected in: flat namespace
in /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
Press ENTER or type command to continue
I am new to the vim plugin community so I was wondering if anyone has any insight to what the problem may be.
EDIT
Ultimately the solution was to reinstall macvim and remove the brew version of python on my machine.
Thanks for advice!
Thanks for asking this question, I was quite puzzled by this. I had a really tough time getting this plugin to work!
So the steps are as follows
The key thing to get around this specific error is to update vim.
brew install macvim --with-override-system-vim
After you do this, close your terminal and open a new terminal. Check the version of vim, it should be version 8 now, i.e.
vim --version | grep IMproved
should have the output:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 20 2017 20:02:24)
Note that it will still be the old mac version until you close your terminal and open a new one.
Now remove the incomplete copy of YouCompleteMe:
sudo rm -rf ~/.vim/bundle/YouCompleteMe
then open vim and install the plugin again
:PluginInstall
It should be successful and not have the error reported in this question. However, I found that when I tried to use it, it wasn't working correctly. You're not done yet! You still need to manually install YouCompleteMe. You can do this by (the --clang-completer is optional, it's just for if you want semantic support for c-family languages):
cd ~/.vim/bundle/YouCompleteMe
./install.py --clang-completer
You may need to install cmake to do this, so just in case, here is the command:
brew install cmake
I hope this works for you! Try it out in a python file. Here is the github repo if you want to checkout the readme:
https://github.com/Valloric/YouCompleteMe
Let me know if you have any problems.
This can also happen when you have a faulty YouCompleteMe installation. Removing the plugin and installing it again fixed it for me.

Installing Plugins in gvim on Windows 8

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.

Resources