{"action":"created","issue":{"url":"https://api.github.com/repos/junegunn/fzf.vim/issues/346","repository_url":"https://api.github.com/repos/junegunn/fzf.vim","labels_url":"https://api.github.com/repos/junegunn/fzf.vim/issues/346/labels{/name}","comments_url":"https://api.github.com/repos/junegunn/fzf.vim/issues/346/comments","events_url":"https://api.github.com/repos/junegunn/fzf.vim/issues/346/events","html_url":"https://github.com/junegunn/fzf.vim/issues/346","id":216103601,"node_id":"MDU6SXNzdWUyMTYxMDM2MDE=","number":346,"title":"Make :Ag not match file names, only the file content","user":{"login":"maximbaz","id":1177900,"node_id":"MDQ6VXNlcjExNzc5MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/1177900?v=4","gravatar_id":"","url":"https://api.github.com/users/maximbaz","html_url":"https://github.com/maximbaz","followers_url":"https://api.github.com/users/maximbaz/followers","following_url":"https://api.github.com/users/maximbaz/following{/other_user}","gists_url":"https://api.github.com/users/maximbaz/gists{/gist_id}","starred_url":"https://api.github.com/users/maximbaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximbaz/subscriptions","organizations_url":"https://api.github.com/users/maximbaz/orgs","repos_url":"https://api.github.com/users/maximbaz/repos","events_url":"https://api.github.com/users/maximbaz/events{/privacy}","received_events_url":"https://api.github.com/users/maximbaz/received_events","type":"User","site_admin":false},"labels":[{"id":247885331,"node_id":"MDU6TGFiZWwyNDc4ODUzMzE=","url":"https://api.github.com/repos/junegunn/fzf.vim/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-03-22T15:24:59Z","updated_at":"2018-08-13T15:28:44Z","closed_at":"2017-03-22T17:51:43Z","author_association":"NONE","body":"<!-- Check all that apply [x] -->\r\n- Category\r\n    - [x] Question\r\n    - [ ] Bug\r\n    - [x] Suggestion\r\n- OS\r\n    - [x] Linux\r\n    - [ ] macOS\r\n    - [ ] Windows\r\n    - [ ] Etc.\r\n- Vim\r\n    - [ ] Vim\r\n    - [x] Neovim\r\n\r\n<!--\r\n\r\nBefore submitting\r\n=================\r\n\r\n- Make sure that you have the latest version of fzf and fzf.vim\r\n- Check if your problem is reproducible with a minimal configuration\r\n\r\nStart Vim with a minimal configuration\r\n======================================\r\n\r\nvim -Nu <(curl https://gist.githubusercontent.com/junegunn/6936bf79fedd3a079aeb1dd2f3c81ef5/raw)\r\n\r\n-->\r\n\r\nSince there is a command `:Files` that can search files by name, I'd like to configure `:Ag` to only look at the file contents, not at the file names. \r\n\r\nI'll demostrate my case below, my question is: can this be achieved today, maybe with some configuration?\r\n\r\n-----\r\n\r\nTo see why this is an annoying issue, create a file called `demo.txt`, put 20 lines each having a random number, and on the 21st line write `demo`. Then use `:Ag demo` to search for this string.\r\n\r\nExpected: you find only one occurrence.\r\nActual: you also find 20 irrelevant occurrences.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1177900/24205485/cdb60acc-0f1b-11e7-94d9-79c098e9b5ee.png)\r\n"},"comment":{"url":"https://api.github.com/repos/junegunn/fzf.vim/issues/comments/412558898","html_url":"https://github.com/junegunn/fzf.vim/issues/346#issuecomment-412558898","issue_url":"https://api.github.com/repos/junegunn/fzf.vim/issues/346","id":412558898,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjU1ODg5OA==","user":{"login":"junegunn","id":700826,"node_id":"MDQ6VXNlcjcwMDgyNg==","avatar_url":"https://avatars2.githubusercontent.com/u/700826?v=4","gravatar_id":"","url":"https://api.github.com/users/junegunn","html_url":"https://github.com/junegunn","followers_url":"https://api.github.com/users/junegunn/followers","following_url":"https://api.github.com/users/junegunn/following{/other_user}","gists_url":"https://api.github.com/users/junegunn/gists{/gist_id}","starred_url":"https://api.github.com/users/junegunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junegunn/subscriptions","organizations_url":"https://api.github.com/users/junegunn/orgs","repos_url":"https://api.github.com/users/junegunn/repos","events_url":"https://api.github.com/users/junegunn/events{/privacy}","received_events_url":"https://api.github.com/users/junegunn/received_events","type":"User","site_admin":false},"created_at":"2018-08-13T15:28:44Z","updated_at":"2018-08-13T15:28:44Z","author_association":"OWNER","body":"```\r\n* fzf#vim#with_preview([[options], preview window, [toggle keys...]])\r\n```\r\n\r\nSo you have to write\r\n\r\n```vim\r\nfzf#vim#with_preview({'options': '--delimiter : --nth 4..'}, 'up:60%')\r\n```"}}
{"actor":{"display_login":"junegunn"}}