Macvim Nerdtree File Path Issue - vim

I am using Macvim some how about a year ago I got Nerdtree working for file browsing.
When I save a file I get a error that says,
Error detected while processing function checksyntax#Check:
E344 Can't find directory "/Users/MyMac/NERD_tree_1" in cdpath
E472 Command failed
Then I go in to finder and check and the new file is there.
But it is not updated in my Nerdtree till I open a new instance of macvim.
Any Ideas how I can fix this? Or where to look?
I obviously need to update this file path,
Where can this be done at?

You can press r to refresh the current directory's listing or R to refresh the root directory's listing

Related

vim: change pwd while working with cscope

I'm currently working on project using vim+cscope.
Sometimes, to make some code-exploring tasks easier I use :cd command to navigate to a specific folder withing the project. But then, if i want to issue some cscope command such as Ctrl-] or :cscope find it won't work before i change back to my project's root directory. I understand that's because cscope just tries to open the path as it is written in the cscope_db file without any sophistication.
So how do i make cscope "remember" my project's root directory so wherever i am it will always know to open the right path?
Apparently :set csre did that for me:
basename of cscope.out location (usually the project root directory) will be used as the prefix to construct an absolute path.
Due to some misconfiguration I missed it.

vim creates temporary files in the current working directory

I normally setup my backup directory in my vimrc as follows.
set backupdir=~/vimtmp,/tmp,.
set directory=~/vimtmp,/tmp,.
This works as all the *.*~ goes to the vimtmp folder.
However, certain plugins such as NERDTree, Tagbar create their temporary files in my current working directory. For instance, following files are created when these plugins are started.
[[buffergator-buffers]]
__Tagbar__
NERD_tree_3
This is really annoying issue because when I work with a version control system, these files are being created in some folders and I sometimes push them to the central repo accidentally.
Could you please suggest me some tips to handle this problem? For instance, how can I set current working directory specifically for the plugins so that they will use that directory for their temporary files.
Thank you very much.
After reviewing my own vimrc file, I found that following auto command is causing the problem. I was using this command to automatically save a file when I have created it. However, the side effect of this command was that it saves all buffers (even NERDTree, TagBar etc.) as well. Therefore, it was cluttering my working directory. So, by disabling the following command, I solved the problem.
" evil command
" autocmd BufNewFile * :write

:vsplit autocomplete not working with /django/ directory in VIM

Normally if I type :vsplit /path/to/some/directoryTab, the available directories will autocomplete.
After doing a reinstall of VIM, there is one directory that now will not allow autocomplete, and I can't figure out why. The directory is ~/Sites/django/. Once I type ~/Sites/, Tab will show me drupal and apps directories, but will not show django. If my working directory is inside this django directory, :vsplit won't let me autocomplete either.
I did a ls -haltr on the directory and it looks the same as the others inside the ~/Sites/ directory.
Also, when I use the CtrlP plugin inside this directory, I get the error "==NO ENTRIES==". In other places, CtrlP works fine.
Why might this be happening and how can I fix it?
The directory is getting ignored because it has /django/ in it's path...which was set by my Python linter. The linter causes Vim to ignore /*django*/. To see this, use set wildignore to see what directories are getting ignored.
I just changed the directory to /dj/ and it works fine.
I could have also changed the wildignore directories by using set wig-=my_directory command.

command-t not finding files

I've recently installed command-t plugin on vim and started playing with it.
But now I feel that it fails finding some files.
For example: I have and inc folder and none of it's contents is listed when I hit <leader> t (and type inc or any filename inside that folder). Other files, in the main folder, aren't listed too.
I've tried flushing using CommandTFlush but no success.
Is there anything missing in my configuration? What can I try to get it working?
Edit: If I go inside inc folder (using :cd) the files are listed. Then, if I return to the parent folder (:cd ..), the same files are not listed any more.
I've set let g:CommandTMaxFiles=50000 in .vimrc and now it is working.
Looks like there was a problem with the max indexed file limit.
Use :pwd to check which is your current working directory. Command-T only works in the current directory.
My guess is that you started vim in a subdirectory of the main tree, and that's why you aren't seeing everything.

VIM: Unable to uninstall Latex-Box plugin with Vimball

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.

Resources