开发者

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

开发者 https://www.devze.com 2023-03-02 05:06 出处:网络
I opened my rails project in MacVim using: cd ~/development/book-examples/agile_web_dev_rails/worked_examples/depot

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?

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

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.


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.


This is not really an answer to your question, but you ought to look at Rails.vim, this allows you to navigate through your app using conventient commands like :Rfixture products (complete with tab completion).

0

精彩评论

暂无评论...
验证码 换一张
取 消