Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't Command-T in MacVim find a file?

Tags:

vim

macvim

I opened my rails project in MacVim using:

cd ~/development/book-examples/agile_web_dev_rails/worked_examples/depot
mvim .

I'm trying to use Command-T to find ./test/fixtures/products.yml; however, I'm having no success. The screenshot below shows that:

  1. NERDTree can see ./test/fixtures/products.yml
  2. Typing test/ into Command-T doesn't even show the fixtures directory

Any thoughts on why fixtures/products.yml isn't found by Command-T?

Command-T Results

Update

If I open just the test directory in MacVim instead of the entire Rails project using:

cd ~/development/book-examples/agile_web_dev_rails/worked_examples/depot/test
mvim .

Then, Command-T is able to find fixtures/products.yml.

like image 997
Matthew Rankin Avatar asked May 25 '26 21:05

Matthew Rankin


1 Answers

The reason is that you have lots of files in the directory you are in. By default plugin reads 10 000 files. You can change this value in your .vimrc:

let CommandTMaxFiles = 20000

It's useful if you work on project which contains tons of files (like Rails). However it's always better to set current dir within VIM with :cd command to make plugin work faster. You can check where you are with :pwd command.

like image 60
Zielun Avatar answered May 30 '26 03:05

Zielun