ag.vim icon indicating copy to clipboard operation
ag.vim copied to clipboard

let g:ag_working_path_mode = 'r' doesn't work

Open codeur4 opened this issue 9 years ago • 12 comments

when I set let g:ag_working_path_mode = 'r' in my .vimrc, nothing change. It search into files of the current directory instead of Project directory. I have a .svn file in the parent project directory. It seems to not detect .svn. Please help

codeur4 avatar Sep 27 '15 11:09 codeur4

Are you sure you don't have a typo in your vimrc?

svn works fine in my case. With either my full vimrc or a minimal one.

I want to help fix it for you since I wrote that piece of code but svn is definitely supported so could you give me some more information?

Numkil avatar Sep 27 '15 13:09 Numkil

I am on windows 7, 64 bit There is my _vimrc file This is my project structure : projectstructure I have files in my js folder in which there is the word option. :Ag option from one file of this folder : jsoption I have files in my views folder in which there is the word option too. :Ag option from one file of this folder : viewoption

Hum.. I'm wondering if my .svn folder is enough higher in the hierarchy ? What do you mean by typo?

codeur4 avatar Sep 27 '15 19:09 codeur4

If I'm not mistaken the problem is caused by the fact that my code relies on unix type path's with a / instead of a windows type path with . I'll test this tomorrow and see if there's anything easy to be done about it.

Your folder hierarchy is fine.

Numkil avatar Sep 27 '15 20:09 Numkil

Thanks

codeur4 avatar Sep 27 '15 22:09 codeur4

@codeur4 would you do me a favour and check out the PR referenced here? I don't have a windows pc, and I'm probably going over this a bit too quickly.

Numkil avatar Sep 29 '15 06:09 Numkil

No, same as before

codeur4 avatar Sep 29 '15 11:09 codeur4

OK i will try and get a windows virtual image from work and figure out the problem. I'll get back to you as soon as possible.

Numkil avatar Sep 30 '15 06:09 Numkil

Ok cool, thanks

codeur4 avatar Sep 30 '15 16:09 codeur4

Hey Numkil, any progress? Having the same problem with the windows type path.

hunhejj avatar Jan 27 '16 14:01 hunhejj

@hunhejj actually there has been. @tplunket has made A fix. You can check it out in pull request #112.

Would you be so kind in checking out that pull request and letting me know if it solves your issues? That way I can start pushing the maintainers to accept thePR.

Numkil avatar Jan 27 '16 14:01 Numkil

oh cool, I was not aware of that. Is there a way checking it out simply with vim-plug?

hunhejj avatar Jan 27 '16 15:01 hunhejj

I don't use vim-plug myself but I expect it should be possible by temporarily using this syntax. Plug 'numkil/ag.nvim', { 'branch': 'fixGuessProjectRootOnWindows' } This will checkout the specific branch I made to start my pull request from. You can see the difference in code at #112.

Numkil avatar Jan 27 '16 15:01 Numkil