Comments
-
Greg Hurrell
Sounds like the number of files in your directory exceeds the
g:CommandTMaxFiles
setting (which defaults to 10,000). You can increase that.Alternatively, your Vim
'wildignore'
setting might be excluding those files, if you've changed that recently (which I doubt).See the docs for more info.
-
Greg Hurrell
Status changed:
- From: new
- To: closed
-
anonymous
That seems to be the case. Is there some way to check how many files are indexed so you know when you need to consider updating wildignore or changing the max files setting?
-
Greg Hurrell
You could get an approximate idea (ie. not taking into account ignored files) in the shell with:
$ find . -type f | wc -l
In general you can just up the limit until you notice some kind of performance degradation. On my machine, for example, I've upped it to 30,000 with no problems. This gives me considerable headroom in the largest project I'm currently working on (about 11k files).
-
anonymous
Well that's gonna count files inside dot directories too right?
I think command-t feels a little bit sluggish already with 10k files. But I'll try upping it to 20k and see what happens.
-
anonymous
Well I remembered you can do it with find | grep -v '/\.' | wc -l
And I upped the limit to 20k and yeah it's still really fast. I don't where I got it from that it sometimes feels a little bit sluggish.
-
Greg Hurrell
In my experience the three things that can make it feel sluggish are:
-
opening it in a directory with a million files and the
g:CommandTMaxFiles
set too high -
not having
'wildignore'
appropriately set to ignore hierarchies that you're not interested in - having an ambiguous mapping that Vim has to wait for to disambiguate
That last one is particularly subtle. In my case I had Command-T mapped to
<Leader>t
(ie.\t
), and there was a noticeable delay every time I opened it, even though it was instant for colleagues who have identical machines to mine.Turned out that the Align.vim plug-in defined a bunch of other mappings that all began with
<Leader>t
, which meant that whenever Vim saw<Leader>t
it had to pause for a second to see if I was going to continue typing one of the letters corresponding to those other mappings.In the end I got around it by preventing Align.vim from loading the file that sets up those conflicting mappings with a line like this in my
~/.vimrc
:let g:loaded_AlignMapsPlugin = "v41"
-
opening it in a directory with a million files and the
Add a comment
Comments are now closed for this issue.