{"id":17361354,"url":"https://github.com/inside/vim-grep-operator","last_synced_at":"2025-07-05T06:32:06.600Z","repository":{"id":66934735,"uuid":"10734918","full_name":"inside/vim-grep-operator","owner":"inside","description":"Bring motion and visual selection to the :grep command","archived":false,"fork":false,"pushed_at":"2015-07-31T14:57:01.000Z","size":242,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T16:52:05.529Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"VimL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inside.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-17T10:21:23.000Z","updated_at":"2025-03-14T02:23:34.000Z","dependencies_parsed_at":"2023-02-22T19:30:15.577Z","dependency_job_id":null,"html_url":"https://github.com/inside/vim-grep-operator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inside%2Fvim-grep-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inside%2Fvim-grep-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inside%2Fvim-grep-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inside%2Fvim-grep-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inside","download_url":"https://codeload.github.com/inside/vim-grep-operator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813826,"owners_count":21165631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T19:32:46.214Z","updated_at":"2025-04-14T02:51:41.969Z","avatar_url":"https://github.com/inside.png","language":"VimL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The vim grep operator\n\n## Description\n\nThe vim grep operator plugin, inspired by Steve Losh and\nhis book: http://learnvimscriptthehardway.stevelosh.com/\n\nThis plugin's has 2 goals:\n\n* bring motion and visual selection to the :grep command\n* open the quickfix window on the fly for easy file match navigation\n\n`\u003cleader\u003eg{motion}` or `\u003cleader\u003eg` on a visual selection will produce this output:\n\n![Grep on the current directory](http://i.imgur.com/blQeg2R.png)\n\n`\u003cleader\u003e\u003cleader\u003eg{motion}` or `\u003cleader\u003e\u003cleader\u003eg` will prompt you for filenames\nand will produce this output:\n\n![Prompt for directories before greping](http://i.imgur.com/wjCQhIG.png)\n\n## Installation\n\nUse pathogen or a pathogen compatible plugin manager.\n\nIf you are using git for source code management, you should have your grepprg\noption set to something like this:\n\n    set grepprg=git\\ grep\\ -n\\ $*\n\n## Suggested ~/.vimrc mappings\n\n    nmap \u003cleader\u003eg \u003cPlug\u003eGrepOperatorOnCurrentDirectory\n    vmap \u003cleader\u003eg \u003cPlug\u003eGrepOperatorOnCurrentDirectory\n    nmap \u003cleader\u003e\u003cleader\u003eg \u003cPlug\u003eGrepOperatorWithFilenamePrompt\n    vmap \u003cleader\u003e\u003cleader\u003eg \u003cPlug\u003eGrepOperatorWithFilenamePrompt\n\n## Choose your grep operator (default: grep)\n\n    let g:grep_operator = 'Ag'\n    let g:grep_operator = 'Ack'\n\n## Configuration\n\nSetting the search register allows hlsearch to highlight that pattern.\nIt also allows using the n, N motions (find next/previous pattern).\nHandling the hlsearch option is up to you.\n\n    let g:grep_operator_set_search_register = 1\n\n## Examples\n\n`\u003cleader\u003egiw` will grep the current directory for the word under the cursor and\nopen the quickfix window.  \n`\u003cleader\u003ega(` will grep for what's inside the parenthesis including the\nparenthesis.  \n`\u003cleader\u003egi'` will grep for what's inside the quotes.\n\nVisually select some characters and type `\u003cleader\u003eg`. This will grep for the\nselected text.\n\nYou can also be prompted for files to grep by using the same motions or visual\nselection but with the `\u003cleader\u003e\u003cleader\u003eg` mapping.\n\n## Useful readings\n\n`:h grepprg`  \n`:h quickfix`  \n`:h text-objects`  \nhttp://learnvimscriptthehardway.stevelosh.com/ and specifically chapters 32, 33, 34\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finside%2Fvim-grep-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finside%2Fvim-grep-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finside%2Fvim-grep-operator/lists"}