Vim: Errors opening "tagbar" plugin - vim

I installed the "tagbar" plugin using Vundle, by addind this to my vimrc:
Bundle 'majutsushi/tagbar'
Version 5.8 of ctags is installed and on my path. I'm using win7. When I try to start tagbar, however, I get this (note: I'm editing a ruby file and executed :TagbarToggle:

Check after listing the Bundle to be sure that all of its files were pulled down by Vundle — ~/.vim/bundle/tagbar/ should exist, and
ls ~/.vim/bundle/tagbar/
should list all of the plugin’s files and directories (autoload/, doc/, plugin/, etc.). (Vundle should do this when :BundleInstall — or :BundleInstall!, which updates listed plugins — is run.)
If all of the plugin’s files are there, try running :scriptnames to see whether they’re all being sourced.

Related

problems installing vim-misc and vim-session plugins on mac / macvim

When I follow github instructions for vim-misc and vim-sessions, after unzipping to /Users/<me>/.vim/misc and /Users/<me>/.vim/vim-session-master, and then restarting macvim, I get
:helptags ~/.vim/doc
E150: Not a directory: ~/.vim/doc
Also tried putting the two folders in /Users/<me>/ (where my .vimrc is) and in the two locations pointer by $VIM and $VIMRUNTIME from within macvim (/Applications/MacVim.app/Contents/Resources/vim) all to no avail.
I guess I really don't understand how running the :helptags <whatever> starts up/completes installation of these plug-ins anyway?
Before using using a plugin managers, plugins used to go directly into ~/.vim, not into ~/.vim/pluginname. That's when we ran :helptags ~/.vim/doc.
Then we had plugin manager, each with different specific way of doing things. Some even take care of registering the documentation of the plugins installed.
IMO, you'd better find a plugin manager suited to your need and use it. I remember a Q/A on vi.SE, you could start by reading it.
If you prefer to install plugins manually instead of using one of plugin managers like vim-plug or others then you should add plugin directory to your runtimepath. Place this line to your .vimrc set runtimepath+=/path/to/plugin. I would not recommend to place plugins directly to ~/.vim directory, use sub-folder instead (e.g. /Users/<you>/.vim/plugins).

How to convert pathogen installation instructions to vundle?

I use Vundle to manage my plugins. However, some plugins only have instructions for manual installation or installation with Pathogen. For example:
install details
Installation With Pathogen:
1. Place in pathogen directory
Installation W/Out Pathogen:
1. Place in .vim/indent directory, or anywhere in your runtime path.
2. If placed outside of .vim/indent directory,
set g:js_indent = /location/to/javascript.vim in your
.vimrc file. (This tells the html.vim file where to find
the javascript indent file)
Source: http://www.vim.org/scripts/script.php?script_id=3081
Is there a way to convert Pathogen installation instructions to work with Vundle?
Or should I have both Pathogen and Vundle installed and use which ever one seems best supported by the Plugin I want to install?
Pathogen just extends your 'runtimepath' to include separate plugin directories under ~/.vim/bundle/... (but doesn't care how you install the plugins there). Later, plugins like Vundle copied that idea and added functionality to automatically update from GitHub and other locations.
As long as you have an install location that is supported by Vundle, it should be trivial to consume it. For the mentioned plugin, this should be (using the vim-scripts.org GitHub mirror):
Plugin 'JavaScript-Indent'
Summary
You don't need explicit instructions from a plugin to install it via a plugin manager. As long as the install location is supported, just follow Vundle's quick start. Vundle offers a superset of Pathogen; you'll never need both.

Installing fuzzyfinder vim plugin

I unziped the vim-fuzzyfinder and vim-l9 packages in my ~/.vimrc directory
[shetye#dev03 ~/.vim/vim-fuzzyfinder]$ls
autoload doc plugin
[shetye#dev03 ~/.vim]$cd vim-l9/
[shetye#dev03 ~/.vim/vim-l9]$ls
autoload doc plugin
Also i tried copying the same in my home directory. vim however does not detect this plugin.
:fuf-usage
E492: Not an editor command fuf-usage
:FufBuffer
E492: Not an editor command FufBuffer
I tried adding the directory ~/.vim/vim-fuzzyfinder, ~/.vim/vim-l9 to the $PATH env variable. That did not help either.
Any ideas on how to get fuzzyfinder going ?
You should install it correctly to make it work. This is the file structure you should have:
~/
+-.vim/
+-autoload/
+-doc/
+-plugin/
Once you get to that point, you are supposed to type this command in Vim:
:helptags ~/.vim/doc
The .vim directory structure that you have created is a mix between traditional Vim (where all plugins are mixed together into single .vim/autoload/, .vim/plugin/, etc. directories) and the separation (into .vim/bundle/<pluginname>/autoload/) created by package managers like Pathogen or Vundle.
Either stick to the original layout (even though there are many proponents for the new package structure, the old one works just fine; it's just not as easy to uninstall a plugin), or install one of the mentioned package managers and adhere to their prescribed layout.

gvim pathogen issues

I downloaded pathogen.vim from github and put it in "autoload" directory under ~/.vim. However now when I fire up gvim, and do :helptags, it says "Argument required". The contents of my ~/.vimrc file are:
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
What am I missing?
Thanks.
Andy
PS: I am doing this so that I can install Nerdtree
--- EDIT 1 ---
Based on what I have seen so far, the pathogen.vim plugin from github did not work for me, so I had to download it from vim.org, and it worked. However now when I do "unzip nerd_tree -d ~/.vim/bundle" and then start up gvim, I can still not find nerdtree.
-----End ---------
According to the pathogen README on github site, you should use :Helptags instead of :helptags. With :Helptags command executed, pathogen should generate all the documentations under directory ~/.vim/bundle now.
helptags is a vim command which has nothing to do with pathogen. The helptags command in vim takes a directory as an argument where it will process .txt files and generate the tags file.
To tell if pathogen is loading correctly you should be able to attempt to :call pathogen#helptags(). If running that manually does not fail, then pathogen is loaded (this is actually unnecessary if you are not getting an error when you start vim because your .vimrc is already running these commands).
The next step for you to complete is to read the documentation provided here on how to install a plugin as a bundle. To summarize:
Make a directory called ~/.vim/bundle
Unzip/clone/copy files from an upstream source into ~/.vim/bundle/plugin-name/. This may contain many files and directories (ftplugin, autoload, doc, etc.).
Fire up vim and test that the functionality provided by plugin-name is available. If not, check that you have completed the above steps correctly.
If you're having problems with pathogen, just remember installing a bundle is not all that different than installing a plugin the normal way. The advantage is you get to keep all files and folders related to that specific plugin in their own directory. This allows you to manage each plugin individually and be confident you are only touching files related to that plugin.
I use pathogen and I find it great, but you don't need pathogen at all to use NERDTree.
Just put the files like this then issue :helptags ~/.vim/doc and it will work:
~/.vim/doc/NERD_tree.txt
~/.vim/nerdtree_plugin/exec_menuitem.vim
~/.vim/nerdtree_plugin/fs_menu.vim
~/.vim/plugin/NERD_tree.vim
My setup with pathogen is very standard:
~/.vim/bundle/NERD_tree/doc/NERD_tree.txt
~/.vim/bundle/NERD_tree/nerdtree_plugin/exec_menuitem.vim
~/.vim/bundle/NERD_tree/nerdtree_plugin/fs_menu.vim
~/.vim/bundle/NERD_tree/nerdtree_plugin/insert_image.vim <-- a custom script not included with the distribution
~/.vim/bundle/NERD_tree/plugin/NERD_tree.vim
and works like a charm.
It it helps, here are the first lines of my ~/.vimrc:
" This must be first, because it changes other options as side effect
set nocompatible
" Use pathogen to easily modify the runtime path to include all plugins under
" the ~/.vim/bundle directory
filetype off " force reloading *after* pathogen loaded
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
filetype plugin indent on " enable detection, plugins and indenting in one step

Uninstalling Plugin in Vim

After installing many plugins in my ~/.vim folder, I feel I no more understand the contents of that folder and I don't feel enough confidence about deleting the plugin from ~/.vim/plugin to uninstall a plugin. What if there are related files in other directories? What if the documentation was already registered (:helptags), yet the plugin will be removed? Is there any procedure to uninstall vim-plugins? I don't really want my Vim to end up being as messy as my Windows.
If you want to uninstall a plugin which was installed into ~/.vim manually, you should redownload its archive, list its content and manually remove everything, then run :helptags again (this will remove missing tags). If plugin was installed from a vimball, see documentation for :RmVimball. Vimball archives normally have .vba or .vba.gz extensions. In case you don't remember vimball file name, it is contained into ~/.vim/.VimballRecord file.
In order to avoid this problem in the future, try vim-addon-manager plugin. Like pathogen, it puts each plugin into separate directory, but is also capable of downloading, installing and updating them.
To manage easily plugins in vim use pathogen
and this awesome article --> come home to vim
If you install vim plugin via Vundle, it's easy to uninstall plugin, comment out the plugin in .vimrc, example:
"Bundle 'tmhedberg/SimpylFold'
then
:BundleClean
common commands of Vundle:
:BundleList -List all plugins
:BundleInstall -Install all plugins
:BundleInstall! -Update all plugins
:BundleSearch foo -Find foo plugin
:BundleSearch! foo -refresh buffer for foo plugin
:BundleClean -clean all plugins if the plugin not defined in .vimrc
You can simply run:
vim +PlugClean
OR open vim and run :PlugClean.
On running this command, it will ask you to remove the plugin directories. answer with y and it will clean the plugs.
Interestingly, even the much downloaded Pathogen.vim documentation boldly suggests (their emphasis, not mine):
For new users, I recommend using Vim's built-in package management instead. :help packages
Ok, I can take a hint, that pathogen is not for most of us new users.
So then looking into native vim packages, and what it has to offer...
The skinny from :help packages seems to be this:
... A package can be downloaded as an archive and unpacked in its own directory.
Thus the files are not mixed with files of other plugins.
That makes it easy to update and remove.

Resources