VIM: Unable to uninstall Latex-Box plugin with Vimball - vim

According to documentation, vimball uninstall should be a very simple process of typing in :RmVimball LatexBox
However, I get the error message
vimball (RmVimball) unable to find in .VimballRecord
I'm pretty sure I'm typing in the right prompt because LatexBox.vmb is the file I ran :so % on to install the plugin.
The Vimball documentation (http://www.cs.csubak.edu/docs/vim/pi_vimball.html) states:
:RmVimball removes all files generated by the specified vimball
(but not any directories it may have made). One may choose a path
for de-installation, too (see |'runtimepath'|); otherwise, the
default is the first existing directory on the |'runtimepath'|.
And indeed my .VimballRecord exists in the first existing directory of the output when I type in :echo &runtimepath . I opened up the .VimballRecord and it says
LatexBox.vmb: call delete('C:\Program Files (x86)\Vim\vimfiles/ftplugin/tex_LatexBox.vim')| ...
which seems to confirm that LatexBox is the correct plugin name. I'm very confused where the error is coming from. Otherwise -- How can I remove this plugin manually? (I'm concerned that going through and deleting files in the ftplugin folder is not thorough)

To uninstall a vim plugin is really easy, because there're no hidden stuff.
Go into C:\Program Files\vim\vimfiles(depending on your system)
Find out all files about LatexBox
Delete them.
Make a backup of vimfiles folder before deleting files.
If something goes wrong, you have a change to recover.
Update:
Answer you question about :helptags command:
When you install a plugin, it may contains help files(for example latexbox.txt).
It was often install in C:\Program Files\vim\vimfiles\doc directory (I will call it doc from now).
This direcotry may contains other help files for other plugins.
Notice there's a tags file in this doc directory. The tags file is used for jumping to location when you press Ctrl-] on a word.
Don't worry if doc\tags not exist.
You can use :helptags C:\Program Files\vim\vimfiles\doc to generate it.
When you install a plugin via vimball (which is just a vimscript to help you creating files/directories),
The vimball will create latexbox.txt in doc directory,
and run :helptags command to update the tags file automatically.
So, when you manually delete doc\latexbox.txt,
the tags file still contains infomatation about latexbox.txt.
Just run :helptags path\you\want\to\sync command again to get doc\tags synchronised.

Been there. The problem is that Vimball version (v31) that comes packaged with Vim is obsolete and does not support .vmb files. Check 1 for the latest Vimball version and you will be alright.

Related

How to install twig.vim in the .vimrc file for Vim 8.1

I'm trying to get this installed in my vim for ubuntu:
https://github.com/nelsyeung/twig.vim
I downloaded the files to ~/.vim folder, but there are no instructions on what I need to put into the .vimrc file to get it activated. What steps am I missing?
I downloaded the files to ~/.vim folder,
No. If you want to use Vim new integrated plugins management, first create the pack directory with a dedicated subdirectory of your choice (let's call it git-plugins but it's really own to you and depend how you want to have things organised)
mkdir -p ~/.vim/pack/git-plugins
In that location, create one of these directories:
start for plugins you always want available when you launch Vim
opt for plugins you want to activate and deactivate manually
Last, there will be a directory for the plugin itself. So, here, you have to download the files into let's say ~/.vim/pack/git-plugins/start/twig/
instructions on what I need […] to get it activated.
Now, launch vim and type the following command:
:packloadall
Check the included manual with
:h packl
This plugin has no doc to integrate into that system. But for general cases, put the following in your ~/.vimrc, after all internal setting and before plugins dedicated settings.
packloadall
silent! helptags ALL

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 resolve these Vimball problems when I install plugins?

I don't like Vimball files in Vim but more and more plugins use Vimball to install themselves.
A month ago I installed a 64 bits OS and moved my vimfiles directory to c:\users\"my-name"
No problem. Everything works fine.
Today I wanted update a plugin (which is now in Vimball).
After sourcing the plugin (:so %)
I received a lot of errors:
Error detected while processing function vimball#Vimvall..vimball#VimballHome:
E739: Cannot create directory C:/Progra~1/Vim/vimfiles
Error detected while processing function vimball# Vimball..<SNR>119_ChgDir:
E344: Can't find directory "C:\Progra~1\Vim\vimfiles in cdpath
E472: Command failed
...and so a whole page more of these kind of errors.
What's happening and how can I resolve it?
Vimballs are extracted into the first existing directory on 'runtimepath'; based on your output, is looks like Vim doesn't recognize the location where you moved your vimfiles to, and instead defaults to the system-wide C:/Progra~1/Vim/vimfiles location, which probably is protected by Windows permissions, thereby causing the errors.
Check the output of :set runtimepath?; the first component should be your C:\Users\my-name\vimfiles; if it isn't, you need to make Vim include it, either via external means (e.g. setting the HOME environment variable), or directly in your ~/.vimrc with :set runtimepath=.... See :help runtimepath for details.
Also, check for g:vimball_home; this Vimball configuration overrides the default logic.
As a workaround (not a solution), you can pass a custom install directory to the :UseVimball command.

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.

Plugins in gVim not working

I need help in installing some of the popular plugins in Vim. I just started learning this editor and is very excited to use the popular plugins. I'm using gVim in Windows XP and have extracted the .vim files and copied them to the Program Files folder of Vim.
Inside my "F:\Program Files\Vim" folder, there are exactly two folders the "vim73" and the "vimfiles" folder. I put the .vim files (EasyMotion.vim) into the "plugin" folder inside the "vimfiles" folder.
When I run gVim, the plugins doesn't work, and in my case, the EasyMotion plugin is not working. I typed the "/w" to make the EasyMotion plugin work (as stated on its usage on its github account) and nothing seems to work.
Am I missing out something here? Are there extra commands to put in the vimrc file to recognize those plugins?
Cheers!
Never touch Program Files. There is a vim setting called 'runtimepath' (see the :help 'rtp') that says where Vim is going to locate the plugins. For each directory in the runtimepath, Vim will source every .vim file found in the plugin subfolder, and lookup for functions containing # in their names in the .vim files of the autoload folder. It will also lookup filetype plugins in the ftplugin folder when 'ft' is set.
Normally you should have %HOMEPATH%\Vim\vimfiles in your runtimepath (:echo &rtp to know). Unzip Easymotion there, NOT in Program Files.
Due to that structure, vim plugins mix up in the same 2-3 folders. However it is possible to install every plugin in its own subfolder if you play with runtimepath. The pathogen plugin is dedicated to that. It makes it possible to have every plugin in its own subfolder, and adds every plugin root folder to the runtimepath. The Readme is self-explanatory.
As #benoit said, you should never in general put files into your vim73 folder
(notable exceptions exist, but you'll know when you encounter them).
On windows, Vim searches for configuration files (those include _vimrc and your
plugins) in several directories, in a certain order. First it will look in
$HOME ... which is your c:\documents and settings\username\ folder
$VIM ... which is the folder where you installed or extracted Vim
$VIMRUNTIME ... which is your \vim73 folder ...
and so on ...
What this means? It means it will first look in $HOME before looking in let's
say, your Vim install folder. So it is a nice way of separating plugins which
you just want to test out before being sure you're gonna be keeping them.
For example, you could organize your Vim related files in this manner:
- install vim to c:\vim or c:\program files\vim\
(vim's program files will go in \...\vim\vim73\)
- put your _vimrc in \vim\
- put your vimfiles in \vim\vimfiles\
- and put your temporary vimfiles in c:\documents and settings\username\vimfiles\
That way when you're done with them, you can just delete that last
\username\vimfiles\ folder.

Resources