2

I did add let g:ag_working_path_mode="r" to my .vimrc but it doesn't work when I tried to search for example :Ag! jquery in /vagrant/my_prj/app/Controller/MyController.php [Git(master)] and I get No matches for "jquery"

But if searched :Ag! jquery /vagrant/my_prj I get around 800 results.

I do have .git folder in /vagrant/my_prj/ folder.

whitesiroi
  • 2,725
  • 4
  • 30
  • 64

1 Answers1

1

If you want vim to always cd to the project's root directory, you could use the plugin called rooter: "Rooter changes the working directory to the project root when you open a file or directory."

see: https://github.com/airblade/vim-rooter

gregory
  • 10,969
  • 2
  • 30
  • 42