{"action":"created","issue":{"url":"https://api.github.com/repos/rking/ag.vim/issues/94","labels_url":"https://api.github.com/repos/rking/ag.vim/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/rking/ag.vim/issues/94/comments","events_url":"https://api.github.com/repos/rking/ag.vim/issues/94/events","html_url":"https://github.com/rking/ag.vim/issues/94","id":62343915,"number":94,"title":"How to search from the root of project?","user":{"login":"aerohit","id":240620,"avatar_url":"https://avatars.githubusercontent.com/u/240620?v=3","gravatar_id":"","url":"https://api.github.com/users/aerohit","html_url":"https://github.com/aerohit","followers_url":"https://api.github.com/users/aerohit/followers","following_url":"https://api.github.com/users/aerohit/following{/other_user}","gists_url":"https://api.github.com/users/aerohit/gists{/gist_id}","starred_url":"https://api.github.com/users/aerohit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerohit/subscriptions","organizations_url":"https://api.github.com/users/aerohit/orgs","repos_url":"https://api.github.com/users/aerohit/repos","events_url":"https://api.github.com/users/aerohit/events{/privacy}","received_events_url":"https://api.github.com/users/aerohit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-17T09:30:33Z","updated_at":"2015-03-22T16:43:09Z","closed_at":null,"body":"Hello,\r\n\r\nWhen I search for a text using \":Ag <pattern>\", it searches inside files contained inside the directory of the current buffer. Is it possible to tell Ag, to search from the root of the project instead. I use git for version control, so maybe using that to determine the root of the project in some way.\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/rking/ag.vim/issues/comments/84651722","html_url":"https://github.com/rking/ag.vim/issues/94#issuecomment-84651722","issue_url":"https://api.github.com/repos/rking/ag.vim/issues/94","id":84651722,"user":{"login":"losingkeys","id":666493,"avatar_url":"https://avatars.githubusercontent.com/u/666493?v=3","gravatar_id":"","url":"https://api.github.com/users/losingkeys","html_url":"https://github.com/losingkeys","followers_url":"https://api.github.com/users/losingkeys/followers","following_url":"https://api.github.com/users/losingkeys/following{/other_user}","gists_url":"https://api.github.com/users/losingkeys/gists{/gist_id}","starred_url":"https://api.github.com/users/losingkeys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/losingkeys/subscriptions","organizations_url":"https://api.github.com/users/losingkeys/orgs","repos_url":"https://api.github.com/users/losingkeys/repos","events_url":"https://api.github.com/users/losingkeys/events{/privacy}","received_events_url":"https://api.github.com/users/losingkeys/received_events","type":"User","site_admin":false},"created_at":"2015-03-22T16:43:09Z","updated_at":"2015-03-22T16:43:09Z","body":"We could add a `:AgGit` and `:AgHg` command to use the directories pointed to by [`git rev-parse --show-toplevel`](https://stackoverflow.com/questions/957928/is-there-a-way-to-get-the-git-root-directory-in-one-command/957978#957978) and [`hg root`](https://stackoverflow.com/questions/957928/is-there-a-way-to-get-the-git-root-directory-in-one-command).\r\n\r\nMaybe `:AgRoot` or `:AgProject` would detect the type of project and search the `$PWD` if none was detected?\r\n\r\nBonus points for old/less popular VCS' (svn, bzr, cvs, etc, etc)."}}