Monday, January 4, 2010

Re: filelist window ?

> Now I invoke vim from the root folder of my project (the folder that
> has my .git folder in it),
> enter the command :TSelectFiles,
> but still it shows me only the files in the root folder, not all the
> files in the project..

I'm terribly sorry but I was mixing up my own plugins. :-)

tselectfiles, which is what we were talking about, doesn't support
retrieving the file list from git. But you can set the project's root
directory and then use the TSelectFilesInSubdirs command. I.e. put the
following line into that .lvimrc file:

let b:tselectfiles_dir = expand('<sfile>:p:h')

and for cosmetic reasons

let b:tselectfiles_prefix = expand('<sfile>:p:h')

If you happen to work with something like rails or vim plugins where
similar named files are scattered across different directories, I'd
also suggest to add this line in order to limit the initial view of
the list to those files related to the current one:

let b:tselectfiles_filter_rx = tselectfiles#BaseFilter()

You can check that the lvimrc file was actually loaded by doing

echo b:tselectfiles_dir

BTW there are several variants of the localvimrc file around. I use
the one by Markus Braun with script ID 1613 I think -- unfortunately a
database-related problem prevents me from checking that on the
vim.sf.net site. Other plugins might work as well but they might use
different filenames -- eg I vaguely remember that one plugin
uses .localvimrc instead.

HTH

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment