{"id":13727495,"url":"https://github.com/wincent/ferret","last_synced_at":"2025-10-25T13:32:45.817Z","repository":{"id":34635041,"uuid":"38586126","full_name":"wincent/ferret","owner":"wincent","description":"🐀 Enhanced multi-file search for Vim","archived":false,"fork":false,"pushed_at":"2025-02-19T11:20:37.000Z","size":1431,"stargazers_count":689,"open_issues_count":6,"forks_count":22,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-04-13T05:06:42.955Z","etag":null,"topics":["ack","ag","ripgrep","vim"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wincent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-05T22:14:55.000Z","updated_at":"2025-04-12T19:10:45.000Z","dependencies_parsed_at":"2023-01-15T08:12:42.452Z","dependency_job_id":"1891a4ed-4319-46d8-8753-5eeecf96d39e","html_url":"https://github.com/wincent/ferret","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wincent%2Fferret","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wincent%2Fferret/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wincent%2Fferret/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wincent%2Fferret/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wincent","download_url":"https://codeload.github.com/wincent/ferret/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665748,"owners_count":21142123,"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":["ack","ag","ripgrep","vim"],"created_at":"2024-08-03T01:04:02.163Z","updated_at":"2025-10-25T13:32:40.782Z","avatar_url":"https://github.com/wincent.png","language":"Vim Script","funding_links":[],"categories":["Vim Script","Vim script"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/wincent/ferret/media/ferret.jpg\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/wincent/ferret/media/ferret.gif\" /\u003e\n\u003c/p\u003e\n\n# ferret\u003ca name=\"ferret-ferret\" href=\"#user-content-ferret-ferret\"\u003e\u003c/a\u003e\n\n## Intro\u003ca name=\"ferret-intro\" href=\"#user-content-ferret-intro\"\u003e\u003c/a\u003e\n\n\u003e \u0026quot;ferret (verb)\u003cbr /\u003e(ferret something out) search tenaciously for and find something: she had the ability to ferret out the facts.\u0026quot;\n\n\u003cp align=\"right\"\u003e\u003ca name=\"ferret-features\" href=\"#user-content-ferret-features\"\u003e\u003ccode\u003eferret-features\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\nFerret improves Vim's multi-file search in four ways:\n\n### 1. Powerful multi-file search\u003ca name=\"ferret-1-powerful-multi-file-search\" href=\"#user-content-ferret-1-powerful-multi-file-search\"\u003e\u003c/a\u003e\n\nFerret provides an \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e command for searching across multiple files using ripgrep (https://github.com/BurntSushi/ripgrep), The Silver Searcher (https://github.com/ggreer/the_silver_searcher), or Ack (http://beyondgrep.com/). Support for passing options through to the underlying search command exists, along with the ability to use full regular expression syntax without doing special escaping. On modern versions of Vim (version 8 or higher, or Neovim), searches are performed asynchronously (without blocking the UI).\n\nShortcut mappings are provided to start an \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e search (`\u003cLeader\u003ea`) or to search for the word currently under the cursor (`\u003cLeader\u003es`).\n\nResults are normally displayed in the \u003cstrong\u003e`quickfix`\u003c/strong\u003e window, but Ferret also provides a \u003cstrong\u003e[`:Lack`](#user-content-lack)\u003c/strong\u003e command that behaves like \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e but uses the \u003cstrong\u003e`location-list`\u003c/strong\u003e instead, and a `\u003cLeader\u003el` mapping as a shortcut to \u003cstrong\u003e[`:Lack`](#user-content-lack)\u003c/strong\u003e.\n\n\u003cstrong\u003e[`:Back`](#user-content-back)\u003c/strong\u003e and \u003cstrong\u003e[`:Black`](#user-content-black)\u003c/strong\u003e are analogous to \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e and \u003cstrong\u003e[`:Lack`](#user-content-lack)\u003c/strong\u003e, but scoped to search within currently open buffers only. \u003cstrong\u003e[`:Quack`](#user-content-quack)\u003c/strong\u003e is scoped to search among the files currently in the \u003cstrong\u003e`quickfix`\u003c/strong\u003e list.\n\n### 2. Streamlined multi-file replace\u003ca name=\"ferret-2-streamlined-multi-file-replace\" href=\"#user-content-ferret-2-streamlined-multi-file-replace\"\u003e\u003c/a\u003e\n\nThe companion to \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e is \u003cstrong\u003e[`:Acks`](#user-content-acks)\u003c/strong\u003e (mnemonic: \u0026quot;Ack substitute\u0026quot;, accessible via shortcut `\u003cLeader\u003er`), which allows you to run a multi-file replace across all the files placed in the \u003cstrong\u003e`quickfix`\u003c/strong\u003e window by a previous invocation of \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e (or \u003cstrong\u003e[`:Back`](#user-content-back)\u003c/strong\u003e, or \u003cstrong\u003e[`:Quack`](#user-content-quack)\u003c/strong\u003e).\n\nCorrespondingly, results obtained by \u003cstrong\u003e[`:Lack`](#user-content-lack)\u003c/strong\u003e can be targeted for replacement with \u003cstrong\u003e[`:Lacks`](#user-content-lacks)\u003c/strong\u003e.\n\n### 3. Quickfix listing enhancements\u003ca name=\"ferret-3-quickfix-listing-enhancements\" href=\"#user-content-ferret-3-quickfix-listing-enhancements\"\u003e\u003c/a\u003e\n\nThe \u003cstrong\u003e`quickfix`\u003c/strong\u003e listing itself is enhanced with settings to improve its usability, and natural mappings that allow quick removal of items from the list (for example, you can reduce clutter in the listing by removing lines that you don't intend to make changes to).\n\nAdditionally, Vim's \u003cstrong\u003e`:cn`\u003c/strong\u003e, \u003cstrong\u003e`:cp`\u003c/strong\u003e, \u003cstrong\u003e`:cnf`\u003c/strong\u003e and \u003cstrong\u003e`:cpf`\u003c/strong\u003e commands are tweaked to make it easier to immediately identify matches by centering them within the viewport.\n\n### 4. Easy operations on files in the quickfix listing\u003ca name=\"ferret-4-easy-operations-on-files-in-the-quickfix-listing\" href=\"#user-content-ferret-4-easy-operations-on-files-in-the-quickfix-listing\"\u003e\u003c/a\u003e\n\nFinally, Ferret provides a \u003cstrong\u003e[`:Qargs`](#user-content-qargs)\u003c/strong\u003e command that puts the files currently in the \u003cstrong\u003e`quickfix`\u003c/strong\u003e listing into the \u003cstrong\u003e`:args`\u003c/strong\u003e list, where they can be operated on in bulk via the \u003cstrong\u003e`:argdo`\u003c/strong\u003e command. This is what's used under the covers on older versions of Vim by \u003cstrong\u003e[`:Acks`](#user-content-acks)\u003c/strong\u003e to do its work (on newer versions the built-in \u003cstrong\u003e`:cdo`\u003c/strong\u003e or \u003cstrong\u003e`:cfdo`\u003c/strong\u003e are used instead).\n\nFerret also provides a \u003cstrong\u003e[`:Largs`](#user-content-largs)\u003c/strong\u003e command, which is a \u003cstrong\u003e`location-list`\u003c/strong\u003e analog for \u003cstrong\u003e[`:Qargs`](#user-content-qargs)\u003c/strong\u003e.\n\n## Installation\u003ca name=\"ferret-installation\" href=\"#user-content-ferret-installation\"\u003e\u003c/a\u003e\n\nTo install Ferret, use your plug-in management system of choice.\n\nIf you don't have a \u0026quot;plug-in management system of choice\u0026quot;, I recommend Pathogen (https://github.com/tpope/vim-pathogen) due to its simplicity and robustness. Assuming that you have Pathogen installed and configured, and that you want to install Ferret into `~/.vim/bundle`, you can do so with:\n\n```\ngit clone https://github.com/wincent/ferret.git ~/.vim/bundle/ferret\n```\n\nAlternatively, if you use a Git submodule for each Vim plug-in, you could do the following after `cd`-ing into the top-level of your Git superproject:\n\n```\ngit submodule add https://github.com/wincent/ferret.git ~/vim/bundle/ferret\ngit submodule init\n```\n\nTo generate help tags under Pathogen, you can do so from inside Vim with:\n\n```\n:call pathogen#helptags()\n```\n\n## Commands\u003ca name=\"ferret-commands\" href=\"#user-content-ferret-commands\"\u003e\u003c/a\u003e\n\n\u003cp align=\"right\"\u003e\u003ca name=\"ack\" href=\"#user-content-ack\"\u003e\u003ccode\u003e:Ack\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:Ack {pattern} {options}`\u003ca name=\"ferret-ack-pattern-options\" href=\"#user-content-ferret-ack-pattern-options\"\u003e\u003c/a\u003e\n\nSearches for {pattern} in all the files under the current directory (see \u003cstrong\u003e`:pwd`\u003c/strong\u003e), unless otherwise overridden via {options}, and displays the results in the \u003cstrong\u003e`quickfix`\u003c/strong\u003e listing.\n\n`rg` (ripgrep) then `ag` (The Silver Searcher) will be used preferentially if present on the system, because they are faster, falling back to `ack`/`ack-grep` as needed.\n\nOn newer versions of Vim (version 8 and above), the search process runs asynchronously in the background and does not block the UI.\n\nAsynchronous searches are preferred because they do not block, despite the fact that Vim itself is single threaded.\n\nThe {pattern} is passed through as-is to the underlying search program, and no escaping is required other than preceding spaces by a single backslash. For example, to search for \u0026quot;\\bfoo[0-9]{2} bar\\b\u0026quot; (ie. using `ag`'s Perl-style regular expression syntax), you could do:\n\n```\n:Ack \\bfoo[0-9]{2}\\ bar\\b\n```\n\nLikewise, {options} are passed through. In this example, we pass the `-w` option (to search on word boundaries), and scope the search to the \u0026quot;foo\u0026quot; and \u0026quot;bar\u0026quot; subdirectories:\n\n```\n:Ack -w something foo bar\n```\n\nAs a convenience `\u003cLeader\u003ea` is set-up (\u003cstrong\u003e[`\u003cPlug\u003e(FerretAck)`](#user-content-plugferretack)\u003c/strong\u003e) as a shortcut to enter \u003cstrong\u003e`Cmdline-mode`\u003c/strong\u003e with `:Ack` inserted on the \u003cstrong\u003e`Cmdline`\u003c/strong\u003e. Likewise `\u003cLeader\u003es` (\u003cstrong\u003e[`\u003cPlug\u003e(FerretAckWord)`](#user-content-plugferretackword)\u003c/strong\u003e) is a shortcut for running \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e with the word currently under the cursor.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"ack\" href=\"#user-content-ack\"\u003e\u003ccode\u003e:Ack!\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:Ack! {pattern} {options}`\u003ca name=\"ferret-ack-pattern-options\" href=\"#user-content-ferret-ack-pattern-options\"\u003e\u003c/a\u003e\n\nLike \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e, but returns all results irrespective of the value of \u003cstrong\u003e[`g:FerretMaxResults`](#user-content-gferretmaxresults)\u003c/strong\u003e.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"lack\" href=\"#user-content-lack\"\u003e\u003ccode\u003e:Lack\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:Lack {pattern} {options}`\u003ca name=\"ferret-lack-pattern-options\" href=\"#user-content-ferret-lack-pattern-options\"\u003e\u003c/a\u003e\n\nJust like \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e, but instead of using the \u003cstrong\u003e`quickfix`\u003c/strong\u003e listing, which is global across an entire Vim instance, it uses the \u003cstrong\u003e`location-list`\u003c/strong\u003e, which is a per-window construct.\n\nNote that \u003cstrong\u003e[`:Lack`](#user-content-lack)\u003c/strong\u003e always runs synchronously via \u003cstrong\u003e`:cexpr`\u003c/strong\u003e.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"lack\" href=\"#user-content-lack\"\u003e\u003ccode\u003e:Lack!\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:Lack! {pattern} {options}`\u003ca name=\"ferret-lack-pattern-options\" href=\"#user-content-ferret-lack-pattern-options\"\u003e\u003c/a\u003e\n\nLike \u003cstrong\u003e[`:Lack`](#user-content-lack)\u003c/strong\u003e, but returns all results irrespective of the value of \u003cstrong\u003e[`g:FerretMaxResults`](#user-content-gferretmaxresults)\u003c/strong\u003e.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"back\" href=\"#user-content-back\"\u003e\u003ccode\u003e:Back\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:Back {pattern} {options}`\u003ca name=\"ferret-back-pattern-options\" href=\"#user-content-ferret-back-pattern-options\"\u003e\u003c/a\u003e\n\nLike \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e, but searches only listed buffers. Note that the search is still delegated to the underlying \u003cstrong\u003e`'grepprg'`\u003c/strong\u003e (`rg`, `ag`, `ack` or `ack-grep`), which means that only buffers written to disk will be searched. If no buffers are written to disk, then \u003cstrong\u003e[`:Back`](#user-content-back)\u003c/strong\u003e behaves exactly like \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e and will search all files in the current directory.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"back\" href=\"#user-content-back\"\u003e\u003ccode\u003e:Back!\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:Back! {pattern} {options}`\u003ca name=\"ferret-back-pattern-options\" href=\"#user-content-ferret-back-pattern-options\"\u003e\u003c/a\u003e\n\nLike \u003cstrong\u003e[`:Back`](#user-content-back)\u003c/strong\u003e, but returns all results irrespective of the value of \u003cstrong\u003e[`g:FerretMaxResults`](#user-content-gferretmaxresults)\u003c/strong\u003e.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"black\" href=\"#user-content-black\"\u003e\u003ccode\u003e:Black\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:Black {pattern} {options}`\u003ca name=\"ferret-black-pattern-options\" href=\"#user-content-ferret-black-pattern-options\"\u003e\u003c/a\u003e\n\nLike \u003cstrong\u003e[`:Lack`](#user-content-lack)\u003c/strong\u003e, but searches only listed buffers. As with \u003cstrong\u003e[`:Back`](#user-content-back)\u003c/strong\u003e, the search is still delegated to the underlying \u003cstrong\u003e`'grepprg'`\u003c/strong\u003e (`rg`, `ag`, `ack` or `ack-grep`), which means that only buffers written to disk will be searched. Likewise, If no buffers are written to disk, then \u003cstrong\u003e[`:Black`](#user-content-black)\u003c/strong\u003e behaves exactly like \u003cstrong\u003e[`:Lack`](#user-content-lack)\u003c/strong\u003e and will search all files in the current directory.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"black\" href=\"#user-content-black\"\u003e\u003ccode\u003e:Black!\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:Black! {pattern} {options}`\u003ca name=\"ferret-black-pattern-options\" href=\"#user-content-ferret-black-pattern-options\"\u003e\u003c/a\u003e\n\nLike \u003cstrong\u003e[`:Black`](#user-content-black)\u003c/strong\u003e, but returns all results irrespective of the value of \u003cstrong\u003e[`g:FerretMaxResults`](#user-content-gferretmaxresults)\u003c/strong\u003e.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"quack\" href=\"#user-content-quack\"\u003e\u003ccode\u003e:Quack\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:Quack {pattern} {options}`\u003ca name=\"ferret-quack-pattern-options\" href=\"#user-content-ferret-quack-pattern-options\"\u003e\u003c/a\u003e\n\nLike \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e, but searches only among files currently in the \u003cstrong\u003e`quickfix`\u003c/strong\u003e listing. Note that the search is still delegated to the underlying \u003cstrong\u003e`'grepprg'`\u003c/strong\u003e (`rg`, `ag`, `ack` or `ack-grep`), which means that only buffers written to disk will be searched. If no buffers are written to disk, then \u003cstrong\u003e[`:Quack`](#user-content-quack)\u003c/strong\u003e behaves exactly like \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e and will search all files in the current directory.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"quack\" href=\"#user-content-quack\"\u003e\u003ccode\u003e:Quack!\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:Quack! {pattern} {options}`\u003ca name=\"ferret-quack-pattern-options\" href=\"#user-content-ferret-quack-pattern-options\"\u003e\u003c/a\u003e\n\nLike \u003cstrong\u003e[`:Quack`](#user-content-quack)\u003c/strong\u003e, but returns all results irrespective of the value of \u003cstrong\u003e[`g:FerretMaxResults`](#user-content-gferretmaxresults)\u003c/strong\u003e.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"acks\" href=\"#user-content-acks\"\u003e\u003ccode\u003e:Acks\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:Acks /{pattern}/{replacement}/`\u003ca name=\"ferret-acks-patternreplacement\" href=\"#user-content-ferret-acks-patternreplacement\"\u003e\u003c/a\u003e\n\nTakes all of the files currently in the \u003cstrong\u003e`quickfix`\u003c/strong\u003e listing and performs a substitution of all instances of {pattern} (a standard Vim search \u003cstrong\u003e`pattern`\u003c/strong\u003e) by {replacement}.\n\nA typical sequence consists of an \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e invocation to populate the \u003cstrong\u003e`quickfix`\u003c/strong\u003e listing and then \u003cstrong\u003e[`:Acks`](#user-content-acks)\u003c/strong\u003e (mnemonic: \u0026quot;Ack substitute\u0026quot;) to perform replacements. For example, to replace \u0026quot;foo\u0026quot; with \u0026quot;bar\u0026quot; across all files in the current directory:\n\n```\n:Ack foo\n:Acks /foo/bar/\n```\n\nThe pattern and replacement are passed through literally to Vim's \u003cstrong\u003e`:substitute`\u003c/strong\u003e command, preserving all characters and escapes, including references to matches in the pattern. For example, the following could be used to swap the order of \u0026quot;foo123\u0026quot; and \u0026quot;bar\u0026quot;:\n\n```\n:Acks /\\v(foo\\d+)(bar)/\\2\\1/\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"lacks\" href=\"#user-content-lacks\"\u003e\u003ccode\u003e:Lacks\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:Lacks /{pattern}/{replacement}/`\u003ca name=\"ferret-lacks-patternreplacement\" href=\"#user-content-ferret-lacks-patternreplacement\"\u003e\u003c/a\u003e\n\nTakes all of the files in the current \u003cstrong\u003e`location-list`\u003c/strong\u003e and performs a substitution of all instances of {pattern} by {replacement}. This is an analog of the \u003cstrong\u003e[`:Acks`](#user-content-acks)\u003c/strong\u003e command, but operates on the \u003cstrong\u003e`location-list`\u003c/strong\u003e instead of the \u003cstrong\u003e`quickfix`\u003c/strong\u003e listing.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"ferretcancelasync\" href=\"#user-content-ferretcancelasync\"\u003e\u003ccode\u003e:FerretCancelAsync\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:FerretCancelAsync`\u003ca name=\"ferret-ferretcancelasync\" href=\"#user-content-ferret-ferretcancelasync\"\u003e\u003c/a\u003e\n\nCancels any asynchronous search that may be in progress in the background.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"ferretpullasync\" href=\"#user-content-ferretpullasync\"\u003e\u003ccode\u003e:FerretPullAsync\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:FerretPullAsync`\u003ca name=\"ferret-ferretpullasync\" href=\"#user-content-ferret-ferretpullasync\"\u003e\u003c/a\u003e\n\nEagerly populates the \u003cstrong\u003e`quickfix`\u003c/strong\u003e (or \u003cstrong\u003e`location-list`\u003c/strong\u003e) window with any results that may have been produced by a long-running asynchronous search in progress in the background.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"qargs\" href=\"#user-content-qargs\"\u003e\u003ccode\u003e:Qargs\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:Qargs`\u003ca name=\"ferret-qargs\" href=\"#user-content-ferret-qargs\"\u003e\u003c/a\u003e\n\nThis is a utility function that is used internally when running on older versions of Vim (prior to version 8) but is also generally useful enough to warrant being exposed publicly.\n\nIt takes the files currently in the \u003cstrong\u003e`quickfix`\u003c/strong\u003e listing and sets them as \u003cstrong\u003e`:args`\u003c/strong\u003e so that they can be operated on en masse via the \u003cstrong\u003e`:argdo`\u003c/strong\u003e command.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"largs\" href=\"#user-content-largs\"\u003e\u003ccode\u003e:Largs\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `:Largs`\u003ca name=\"ferret-largs\" href=\"#user-content-ferret-largs\"\u003e\u003c/a\u003e\n\nJust like \u003cstrong\u003e[`:Qargs`](#user-content-qargs)\u003c/strong\u003e, but applies to the current \u003cstrong\u003e`location-list`\u003c/strong\u003e.\n\nIt takes the files in the current \u003cstrong\u003e`location-list`\u003c/strong\u003e and sets them as \u003cstrong\u003e`:args`\u003c/strong\u003e so that they can be operated on en masse via the \u003cstrong\u003e`:argdo`\u003c/strong\u003e command.\n\n## Mappings\u003ca name=\"ferret-mappings\" href=\"#user-content-ferret-mappings\"\u003e\u003c/a\u003e\n\n### Circumstances where mappings do not get set up\u003ca name=\"ferret-circumstances-where-mappings-do-not-get-set-up\" href=\"#user-content-ferret-circumstances-where-mappings-do-not-get-set-up\"\u003e\u003c/a\u003e\n\nNote that Ferret will not try to set up the \u003cstrong\u003e`\u003cLeader\u003e`\u003c/strong\u003e mappings if any of the following are true:\n\n- A mapping with the same \u003cstrong\u003e`{lhs}`\u003c/strong\u003e already exists.\n- An alternative mapping for the same functionality has already been set up from a \u003cstrong\u003e`.vimrc`\u003c/strong\u003e.\n- The mapping has been suppressed by setting \u003cstrong\u003e[`g:FerretMap`](#user-content-gferretmap)\u003c/strong\u003e to 0 in your \u003cstrong\u003e`.vimrc`\u003c/strong\u003e.\n\n### Mappings specific to the quickfix window\u003ca name=\"ferret-mappings-specific-to-the-quickfix-window\" href=\"#user-content-ferret-mappings-specific-to-the-quickfix-window\"\u003e\u003c/a\u003e\n\nAdditionally, Ferret will set up special mappings in \u003cstrong\u003e`quickfix`\u003c/strong\u003e listings, unless prevented from doing so by \u003cstrong\u003e[`g:FerretQFMap`](#user-content-gferretqfmap)\u003c/strong\u003e:\n\n- `d` (\u003cstrong\u003e`visual-mode`\u003c/strong\u003e): delete visual selection\n- `dd` (\u003cstrong\u003e`Normal-mode`\u003c/strong\u003e): delete current line\n- `d`{motion} (\u003cstrong\u003e`Normal-mode`\u003c/strong\u003e): delete range indicated by {motion}\n\n### `\u003cPlug\u003e(FerretBack)`\u003ca name=\"ferret-plugferretback\" href=\"#user-content-ferret-plugferretback\"\u003e\u003c/a\u003e\n\nFerret provides \u003cstrong\u003e[`\u003cPlug\u003e(FerretBack)`](#user-content-plugferretback)\u003c/strong\u003e which can be used to trigger the \u003cstrong\u003e[`:Back`](#user-content-back)\u003c/strong\u003e command. To configure a mapping for it, use \u003cstrong\u003e`:nmap`\u003c/strong\u003e:\n\n```\nnmap \u003cLeader\u003efb \u003cPlug\u003e(FerretBack)\n```\n\n### `\u003cPlug\u003e(FerretBlack)`\u003ca name=\"ferret-plugferretblack\" href=\"#user-content-ferret-plugferretblack\"\u003e\u003c/a\u003e\n\nFerret provides \u003cstrong\u003e[`\u003cPlug\u003e(FerretBlack)`](#user-content-plugferretblack)\u003c/strong\u003e which can be used to trigger the \u003cstrong\u003e[`:Black`](#user-content-black)\u003c/strong\u003e command. To configure a mapping for it, use \u003cstrong\u003e`:nmap`\u003c/strong\u003e:\n\n```\nnmap \u003cLeader\u003efl \u003cPlug\u003e(FerretBlack)\n```\n\n### `\u003cPlug\u003e(FerretQuack)`\u003ca name=\"ferret-plugferretquack\" href=\"#user-content-ferret-plugferretquack\"\u003e\u003c/a\u003e\n\nFerret provides \u003cstrong\u003e[`\u003cPlug\u003e(FerretBack)`](#user-content-plugferretback)\u003c/strong\u003e which can be used to trigger the \u003cstrong\u003e[`:Quack`](#user-content-quack)\u003c/strong\u003e command. To configure a mapping for it, use \u003cstrong\u003e`:nmap`\u003c/strong\u003e:\n\n```\nnmap \u003cLeader\u003efq \u003cPlug\u003e(FerretQuack)\n```\n\n### `\u003cPlug\u003e(FerretAck)`\u003ca name=\"ferret-plugferretack\" href=\"#user-content-ferret-plugferretack\"\u003e\u003c/a\u003e\n\nFerret maps `\u003cLeader\u003ea` to \u003cstrong\u003e[`\u003cPlug\u003e(FerretAck)`](#user-content-plugferretack)\u003c/strong\u003e, which triggers the \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e command. To use an alternative mapping instead, create a different one in your \u003cstrong\u003e`.vimrc`\u003c/strong\u003e instead using \u003cstrong\u003e`:nmap`\u003c/strong\u003e:\n\n```\n\" Instead of \u003cLeader\u003ea, use \u003cLeader\u003ex.\nnmap \u003cLeader\u003ex \u003cPlug\u003e(FerretAck)\n```\n\n### `\u003cPlug\u003e(FerretLack)`\u003ca name=\"ferret-plugferretlack\" href=\"#user-content-ferret-plugferretlack\"\u003e\u003c/a\u003e\n\nFerret maps `\u003cLeader\u003el` to \u003cstrong\u003e[`\u003cPlug\u003e(FerretLack)`](#user-content-plugferretlack)\u003c/strong\u003e, which triggers the \u003cstrong\u003e[`:Lack`](#user-content-lack)\u003c/strong\u003e command. To use an alternative mapping instead, create a different one in your \u003cstrong\u003e`.vimrc`\u003c/strong\u003e instead using \u003cstrong\u003e`:nmap`\u003c/strong\u003e:\n\n```\n\" Instead of \u003cLeader\u003el, use \u003cLeader\u003ey.\nnmap \u003cLeader\u003ey \u003cPlug\u003e(FerretLack)\n```\n\n### `\u003cPlug\u003e(FerretAckWord)`\u003ca name=\"ferret-plugferretackword\" href=\"#user-content-ferret-plugferretackword\"\u003e\u003c/a\u003e\n\nFerret maps `\u003cLeader\u003es` (mnemonic: \u0026quot;selection) to \u003cstrong\u003e[`\u003cPlug\u003e(FerretAckWord)`](#user-content-plugferretackword)\u003c/strong\u003e, which uses \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e to search for the word currently under the cursor. To use an alternative mapping instead, create a different one in your \u003cstrong\u003e`.vimrc`\u003c/strong\u003e instead using \u003cstrong\u003e`:nmap`\u003c/strong\u003e:\n\n```\n\" Instead of \u003cLeader\u003es, use \u003cLeader\u003ez.\nnmap \u003cLeader\u003ez \u003cPlug\u003e(FerretAckWord)\n```\n\n### `\u003cPlug\u003e(FerretAcks)`\u003ca name=\"ferret-plugferretacks\" href=\"#user-content-ferret-plugferretacks\"\u003e\u003c/a\u003e\n\nFerret maps `\u003cLeader\u003er` (mnemonic: \u0026quot;replace\u0026quot;) to \u003cstrong\u003e[`\u003cPlug\u003e(FerretAcks)`](#user-content-plugferretacks)\u003c/strong\u003e, which triggers the \u003cstrong\u003e[`:Acks`](#user-content-acks)\u003c/strong\u003e command and fills the prompt with the last search term from Ferret. to use an alternative mapping instead, create a different one in your \u003cstrong\u003e`.vimrc`\u003c/strong\u003e instead using \u003cstrong\u003e`:nmap`\u003c/strong\u003e:\n\n```\n\" Instead of \u003cLeader\u003er, use \u003cLeader\u003eu.\nnmap \u003cLeader\u003eu \u003cPlug\u003e(FerretAcks)\n```\n\n## Options\u003ca name=\"ferret-options\" href=\"#user-content-ferret-options\"\u003e\u003c/a\u003e\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretnvim\" href=\"#user-content-gferretnvim\"\u003e\u003ccode\u003eg:FerretNvim\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretNvim` (boolean, default: 1)\u003ca name=\"ferret-gferretnvim-boolean-default-1\" href=\"#user-content-ferret-gferretnvim-boolean-default-1\"\u003e\u003c/a\u003e\n\nControls whether to use Neovim's \u003cstrong\u003e`job-control`\u003c/strong\u003e features, when available, to run searches asynchronously. To prevent this from being used, set to 0, in which case Ferret will fall back to the next method in the list (Vim's built-in async primitives -- see \u003cstrong\u003e[`g:FerretJob`](#user-content-gferretjob)\u003c/strong\u003e -- which are typically not available in Neovim, so will then fall back to the next available method).\n\n```\nlet g:FerretNvim=0\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretjob\" href=\"#user-content-gferretjob\"\u003e\u003ccode\u003eg:FerretJob\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretJob` (boolean, default: 1)\u003ca name=\"ferret-gferretjob-boolean-default-1\" href=\"#user-content-ferret-gferretjob-boolean-default-1\"\u003e\u003c/a\u003e\n\nControls whether to use Vim's \u003cstrong\u003e`+job`\u003c/strong\u003e feature, when available, to run searches asynchronously. To prevent \u003cstrong\u003e`+job`\u003c/strong\u003e from being used, set to 0, in which case Ferret will fall back to the next available method.\n\n```\nlet g:FerretJob=0\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferrethlsearch\" href=\"#user-content-gferrethlsearch\"\u003e\u003ccode\u003eg:FerretHlsearch\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretHlsearch` (boolean, default: none)\u003ca name=\"ferret-gferrethlsearch-boolean-default-none\" href=\"#user-content-ferret-gferrethlsearch-boolean-default-none\"\u003e\u003c/a\u003e\n\nControls whether Ferret should attempt to highlight the search pattern when running \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e or \u003cstrong\u003e[`:Lack`](#user-content-lack)\u003c/strong\u003e. If left unset, Ferret will respect the current 'hlsearch' setting. To force highlighting on or off irrespective of 'hlsearch', set \u003cstrong\u003e[`g:FerretHlsearch`](#user-content-gferrethlsearch)\u003c/strong\u003e to 1 (on) or 0 (off):\n\n```\nlet g:FerretHlsearch=0\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretackscommand\" href=\"#user-content-gferretackscommand\"\u003e\u003ccode\u003eg:FerretAcksCommand\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretAcksCommand` (string, default: \"cdo\")\u003ca name=\"ferret-gferretackscommand-string-default-cdo\" href=\"#user-content-ferret-gferretackscommand-string-default-cdo\"\u003e\u003c/a\u003e\n\nControls the underlying Vim command that \u003cstrong\u003e[`:Acks`](#user-content-acks)\u003c/strong\u003e uses to peform substitutions. On versions of Vim that have it, defaults to \u003cstrong\u003e`:cdo`\u003c/strong\u003e, which means that substitutions will apply to the specific lines currently in the \u003cstrong\u003e`quickfix`\u003c/strong\u003e listing. Can be set to \u0026quot;cfdo\u0026quot; to instead use \u003cstrong\u003e`:cfdo`\u003c/strong\u003e (if available), which means that the substitutions will be applied on a per-file basis to all the files in the \u003cstrong\u003e`quickfix`\u003c/strong\u003e listing. This distinction is important if you have used Ferret's bindings to delete entries from the listing.\n\n```\nlet g:FerretAcksCommand='cfdo'\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretlackscommand\" href=\"#user-content-gferretlackscommand\"\u003e\u003ccode\u003eg:FerretLacksCommand\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretLacksCommand` (string, default: \"ldo\")\u003ca name=\"ferret-gferretlackscommand-string-default-ldo\" href=\"#user-content-ferret-gferretlackscommand-string-default-ldo\"\u003e\u003c/a\u003e\n\nControls the underlying Vim command that \u003cstrong\u003e[`:Lacks`](#user-content-lacks)\u003c/strong\u003e uses to peform substitutions. On versions of Vim that have it, defaults to \u003cstrong\u003e`:ldo`\u003c/strong\u003e, which means that substitutions will apply to the specific lines currently in the \u003cstrong\u003e`location-list`\u003c/strong\u003e. Can be set to \u0026quot;lfdo\u0026quot; to instead use \u003cstrong\u003e`:lfdo`\u003c/strong\u003e (if available), which means that the substitutions will be applied on a per-file basis to all the files in the \u003cstrong\u003e`location-list`\u003c/strong\u003e. This distinction is important if you have used Ferret's bindings to delete entries from the listing.\n\n```\nlet g:FerretLacksCommand='lfdo'\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretverymagic\" href=\"#user-content-gferretverymagic\"\u003e\u003ccode\u003eg:FerretVeryMagic\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretVeryMagic` (boolean, default: 1)\u003ca name=\"ferret-gferretverymagic-boolean-default-1\" href=\"#user-content-ferret-gferretverymagic-boolean-default-1\"\u003e\u003c/a\u003e\n\nControls whether the \u003cstrong\u003e[`\u003cPlug\u003e(FerretAcks)`](#user-content-plugferretacks)\u003c/strong\u003e mapping should populate the command line with the \u003cstrong\u003e`/\\v`\u003c/strong\u003e \u0026quot;very magic\u0026quot; marker. Given that the argument passed to \u003cstrong\u003e[`:Acks`](#user-content-acks)\u003c/strong\u003e is handed straight to Vim, using \u0026quot;very magic\u0026quot; makes it more likely that the (probably Perl-compatible) regular expression used in the initial search can be used directly with Vim's (famously not-Perl-compatible) regular expression engine.\n\nTo prevent the automatic use of \u003cstrong\u003e`/\\v`\u003c/strong\u003e, set this option to 0:\n\n```\nlet g:FerretVeryMagic=0\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretexecutable\" href=\"#user-content-gferretexecutable\"\u003e\u003ccode\u003eg:FerretExecutable\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretExecutable` (string, default: \"rg,ag,ack,ack-grep\")\u003ca name=\"ferret-gferretexecutable-string-default-rgagackack-grep\" href=\"#user-content-ferret-gferretexecutable-string-default-rgagackack-grep\"\u003e\u003c/a\u003e\n\nFerret will preferentially use `rg`, `ag` and finally `ack`/`ack-grep` (in that order, using the first found executable), however you can force your preference for a specific tool to be used by setting an override in your \u003cstrong\u003e`.vimrc`\u003c/strong\u003e. Valid values are a comma-separated list of \u0026quot;rg\u0026quot;, \u0026quot;ag\u0026quot;, \u0026quot;ack\u0026quot; or \u0026quot;ack-grep\u0026quot;. If no requested executable exists, Ferret will fall-back to the next in the default list.\n\nExample:\n\n```\n\" Prefer `ag` over `rg`.\nlet g:FerretExecutable='ag,rg'\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretexecutablearguments\" href=\"#user-content-gferretexecutablearguments\"\u003e\u003ccode\u003eg:FerretExecutableArguments\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretExecutableArguments` (dict, default: {})\u003ca name=\"ferret-gferretexecutablearguments-dict-default-\" href=\"#user-content-ferret-gferretexecutablearguments-dict-default-\"\u003e\u003c/a\u003e\n\nAllows you to override the default arguments that get passed to the underlying search executables. For example, to add `-s` to the default arguments passed to `ack` (`--column --with-filename`):\n\n```\nlet g:FerretExecutableArguments = {\n  \\   'ack': '--column --with-filename -s'\n  \\ }\n```\n\nTo find out the default arguments for a given executable, see \u003cstrong\u003e[`ferret#get_default_arguments()`](#user-content-ferretgetdefaultarguments)\u003c/strong\u003e.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretmaxresults\" href=\"#user-content-gferretmaxresults\"\u003e\u003ccode\u003eg:FerretMaxResults\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretMaxResults` (number, default: 100000)\u003ca name=\"ferret-gferretmaxresults-number-default-100000\" href=\"#user-content-ferret-gferretmaxresults-number-default-100000\"\u003e\u003c/a\u003e\n\nControls the maximum number of results Ferret will attempt to gather before displaying the results. Note that this only applies when searching asynchronously; that is, on recent versions of Vim with \u003cstrong\u003e`+job`\u003c/strong\u003e support and when \u003cstrong\u003e[`g:FerretJob`](#user-content-gferretjob)\u003c/strong\u003e is not set to 0.\n\nThe intent of this option is to prevent runaway search processes that produce huge volumes of output (for example, searching for a common string like \u0026quot;test\u0026quot; inside a \u003cstrong\u003e`$HOME`\u003c/strong\u003e directory containing millions of files) from locking up Vim.\n\nIn the event that Ferret aborts a search that has hit the \u003cstrong\u003e[`g:FerretMaxResults`](#user-content-gferretmaxresults)\u003c/strong\u003e limit, a message will be printed prompting users to run the search again with \u003cstrong\u003e[`:Ack!`](#user-content-ack)\u003c/strong\u003e or \u003cstrong\u003e[`:Lack!`](#user-content-lack)\u003c/strong\u003e if they want to bypass the limit.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretautojump\" href=\"#user-content-gferretautojump\"\u003e\u003ccode\u003eg:FerretAutojump\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretAutojump` (number, default: 1)\u003ca name=\"ferret-gferretautojump-number-default-1\" href=\"#user-content-ferret-gferretautojump-number-default-1\"\u003e\u003c/a\u003e\n\nControls whether Ferret will automatically jump to the first found match.\n\n- Set to 0, Ferret will show the search results but perform no jump.\n- Set to 1 (the default), Ferret will show the search results and focus the result listing.\n- Set to 2, Ferret will show the search results and jump to the first found match.\n\nExample override:\n\n```\nlet g:FerretAutojump=2\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretqfhandler\" href=\"#user-content-gferretqfhandler\"\u003e\u003ccode\u003eg:FerretQFHandler\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretQFHandler` (string, default: \"botright copen\")\u003ca name=\"ferret-gferretqfhandler-string-default-botright-copen\" href=\"#user-content-ferret-gferretqfhandler-string-default-botright-copen\"\u003e\u003c/a\u003e\n\nAllows you to override the mechanism that opens the \u003cstrong\u003e`quickfix`\u003c/strong\u003e window to display search results.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretllhandler\" href=\"#user-content-gferretllhandler\"\u003e\u003ccode\u003eg:FerretLLHandler\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretLLHandler` (string, default: \"lopen\")\u003ca name=\"ferret-gferretllhandler-string-default-lopen\" href=\"#user-content-ferret-gferretllhandler-string-default-lopen\"\u003e\u003c/a\u003e\n\nAllows you to override the mechanism that opens the \u003cstrong\u003e`location-list`\u003c/strong\u003e window to display search results.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretqfoptions\" href=\"#user-content-gferretqfoptions\"\u003e\u003ccode\u003eg:FerretQFOptions\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretQFOptions` (boolean, default: 1)\u003ca name=\"ferret-gferretqfoptions-boolean-default-1\" href=\"#user-content-ferret-gferretqfoptions-boolean-default-1\"\u003e\u003c/a\u003e\n\nControls whether to set up setting overrides for \u003cstrong\u003e`quickfix`\u003c/strong\u003e windows. These are various settings, such as \u003cstrong\u003e`norelativenumber`\u003c/strong\u003e, \u003cstrong\u003e`nolist`\u003c/strong\u003e and \u003cstrong\u003e`nowrap`\u003c/strong\u003e, that are intended to make the \u003cstrong\u003e`quickfix`\u003c/strong\u003e window, which is typically very small relative to other windows, more usable.\n\nA full list of overridden settings can be found in \u003cstrong\u003e[`ferret-overrides`](#user-content-ferret-overrides)\u003c/strong\u003e.\n\nTo prevent the custom settings from being applied, set \u003cstrong\u003e[`g:FerretQFOptions`](#user-content-gferretqfoptions)\u003c/strong\u003e to 0:\n\n```\nlet g:FerretQFOptions=0\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretqfmap\" href=\"#user-content-gferretqfmap\"\u003e\u003ccode\u003eg:FerretQFMap\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretQFMap` (boolean, default: 1)\u003ca name=\"ferret-gferretqfmap-boolean-default-1\" href=\"#user-content-ferret-gferretqfmap-boolean-default-1\"\u003e\u003c/a\u003e\n\nControls whether to set up mappings in the \u003cstrong\u003e`quickfix`\u003c/strong\u003e results window and \u003cstrong\u003e`location-list`\u003c/strong\u003e for deleting results. The mappings include:\n\n- `d` (\u003cstrong\u003e`visual-mode`\u003c/strong\u003e): delete visual selection\n- `dd` (\u003cstrong\u003e`Normal-mode`\u003c/strong\u003e): delete current line\n- `d`{motion} (\u003cstrong\u003e`Normal-mode`\u003c/strong\u003e): delete range indicated by {motion}\n\nTo prevent these mappings from being set up, set to 0:\n\n```\nlet g:FerretQFMap=0\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretloaded\" href=\"#user-content-gferretloaded\"\u003e\u003ccode\u003eg:FerretLoaded\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretLoaded` (any, default: none)\u003ca name=\"ferret-gferretloaded-any-default-none\" href=\"#user-content-ferret-gferretloaded-any-default-none\"\u003e\u003c/a\u003e\n\nTo prevent Ferret from being loaded, set \u003cstrong\u003e[`g:FerretLoaded`](#user-content-gferretloaded)\u003c/strong\u003e to any value in your \u003cstrong\u003e`.vimrc`\u003c/strong\u003e. For example:\n\n```\nlet g:FerretLoaded=1\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretlazyinit\" href=\"#user-content-gferretlazyinit\"\u003e\u003ccode\u003eg:FerretLazyInit\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretLazyInit` (boolean, default: 1)\u003ca name=\"ferret-gferretlazyinit-boolean-default-1\" href=\"#user-content-ferret-gferretlazyinit-boolean-default-1\"\u003e\u003c/a\u003e\n\nIn order to minimize impact on Vim start-up time Ferret will initialize itself lazily on first use by default. If you wish to force immediate initialization (for example, to cause \u003cstrong\u003e`'grepprg'`\u003c/strong\u003e and \u003cstrong\u003e`'grepformat'`\u003c/strong\u003e to be set as soon as Vim launches), then set \u003cstrong\u003e[`g:FerretLazyInit`](#user-content-gferretlazyinit)\u003c/strong\u003e to 0 in your \u003cstrong\u003e`.vimrc`\u003c/strong\u003e:\n\n```\nlet g:FerretLazyInit=0\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretcommandnames\" href=\"#user-content-gferretcommandnames\"\u003e\u003ccode\u003eg:FerretCommandNames\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretCommandNames` (dictionary, default: {})\u003ca name=\"ferret-gferretcommandnames-dictionary-default-\" href=\"#user-content-ferret-gferretcommandnames-dictionary-default-\"\u003e\u003c/a\u003e\n\nFerret's command names are mostly chosen because the plugin started as a simple `ack` wrapper. As related commands were added over time, a pattern involving common suffixes evolved, to make the commands easy to remember (even once Ferret started offering support for non-`ack` tools, such as `ag` and `rg`). As such, \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e, \u003cstrong\u003e[`:Back`](#user-content-back)\u003c/strong\u003e, \u003cstrong\u003e[`:Black`](#user-content-black)\u003c/strong\u003e, \u003cstrong\u003e[`:Lack`](#user-content-lack)\u003c/strong\u003e, and \u003cstrong\u003e[`:Quack`](#user-content-quack)\u003c/strong\u003e are all commands, as are the variants \u003cstrong\u003e[`:Acks`](#user-content-acks)\u003c/strong\u003e and \u003cstrong\u003e[`:Lacks`](#user-content-lacks)\u003c/strong\u003e, along with \u003cstrong\u003e[`:Qargs`](#user-content-qargs)\u003c/strong\u003e and \u003cstrong\u003e[`:Largs`](#user-content-largs)\u003c/strong\u003e. Exceptions to the pattern are \u003cstrong\u003e[`:FerretCancelAsync`](#user-content-ferretcancelasync)\u003c/strong\u003e and \u003cstrong\u003e[`:FerretPullAsync`](#user-content-ferretpullasync)\u003c/strong\u003e.\n\nShould you wish to override any or all of these names, you may define \u003cstrong\u003e[`g:FerretCommandNames`](#user-content-gferretcommandnames)\u003c/strong\u003e early on in your \u003cstrong\u003e`.vimrc`\u003c/strong\u003e (before Ferret is loaded), and it will use the specified names instead, falling back to the defaults for any undefined commands. For example, to use `:Rg` in place of the \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e command, and `:Rgb` in place of \u003cstrong\u003e[`:Back`](#user-content-back)\u003c/strong\u003e, but keep using the standard names for all other commands, you would write:\n\n```\nlet g:FerretCommandNames={'Ack': 'Rg', 'Back': 'Rgb'}\n```\n\nOverriding may be useful to avoid conflicts with other plug-ins that compete to define commands with the same names, or simply to match personal preferences.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretackwordword\" href=\"#user-content-gferretackwordword\"\u003e\u003ccode\u003eg:FerretAckWordWord\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretAckWordWord` (boolean, default: 0)\u003ca name=\"ferret-gferretackwordword-boolean-default-0\" href=\"#user-content-ferret-gferretackwordword-boolean-default-0\"\u003e\u003c/a\u003e\n\nWhen set to 1, passes the `-w` option to the underlying search tool whenever \u003cstrong\u003e[`\u003cPlug\u003e(FerretAckWord)`](#user-content-plugferretackword)\u003c/strong\u003e is pressed. This forces the tool to match only on word boundaries (ie. analagous to Vim's \u003cstrong\u003e`star`\u003c/strong\u003e mapping).\n\nThe default is 0, which means the `-w` option is not passed and matches need not occur on word boundaries (ie. analagous to Vim's \u003cstrong\u003e`gstar`\u003c/strong\u003e mapping).\n\nTo override the default:\n\n```\nlet g:FerretAckWordWord=1\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretmap\" href=\"#user-content-gferretmap\"\u003e\u003ccode\u003eg:FerretMap\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretMap` (boolean, default: 1)\u003ca name=\"ferret-gferretmap-boolean-default-1\" href=\"#user-content-ferret-gferretmap-boolean-default-1\"\u003e\u003c/a\u003e\n\nControls whether to set up the Ferret mappings, such as \u003cstrong\u003e[`\u003cPlug\u003e(FerretAck)`](#user-content-plugferretack)\u003c/strong\u003e (see \u003cstrong\u003e[`ferret-mappings`](#user-content-ferret-mappings)\u003c/strong\u003e for a full list). To prevent any mapping from being configured, set to 0:\n\n```\nlet g:FerretMap=0\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretqfcommands\" href=\"#user-content-gferretqfcommands\"\u003e\u003ccode\u003eg:FerretQFCommands\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretQFCommands` (boolean, default: 1)\u003ca name=\"ferret-gferretqfcommands-boolean-default-1\" href=\"#user-content-ferret-gferretqfcommands-boolean-default-1\"\u003e\u003c/a\u003e\n\nControls whether to set up custom versions of the \u003cstrong\u003e`quickfix`\u003c/strong\u003e commands, \u003cstrong\u003e`:cn`\u003c/strong\u003e, \u003cstrong\u003e`:cnf`\u003c/strong\u003e, \u003cstrong\u003e`:cp`\u003c/strong\u003e an \u003cstrong\u003e`:cpf`\u003c/strong\u003e. These overrides vertically center the match within the viewport on each jump. To prevent the custom versions from being configured, set to 0:\n\n```\nlet g:FerretQFCommands=0\n```\n\n\u003cp align=\"right\"\u003e\u003ca name=\"gferretformat\" href=\"#user-content-gferretformat\"\u003e\u003ccode\u003eg:FerretFormat\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `g:FerretFormat` (string, default: \"%f:%l:%c:%m\")\u003ca name=\"ferret-gferretformat-string-default-flcm\" href=\"#user-content-ferret-gferretformat-string-default-flcm\"\u003e\u003c/a\u003e\n\nSets the '\u003cstrong\u003e`grepformat`\u003c/strong\u003e' used by Ferret.\n\n## Functions\u003ca name=\"ferret-functions\" href=\"#user-content-ferret-functions\"\u003e\u003c/a\u003e\n\n\u003cp align=\"right\"\u003e\u003ca name=\"ferretgetdefaultarguments\" href=\"#user-content-ferretgetdefaultarguments\"\u003e\u003ccode\u003eferret#get_default_arguments()\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### `ferret#get_default_arguments()`\u003ca name=\"ferret-ferretgetdefaultarguments\" href=\"#user-content-ferret-ferretgetdefaultarguments\"\u003e\u003c/a\u003e\n\nCall this with an executable name to find out the default arguments that will be passed when invoking that executable. For example:\n\n```\necho ferret#get_default_arguments('rg')\n```\n\nThis may be useful if you wish to extend or otherwise modify the arguments by setting \u003cstrong\u003e[`g:FerretExecutableArguments`](#user-content-gferretexecutablearguments)\u003c/strong\u003e.\n\n## Custom autocommands\u003ca name=\"ferret-custom-autocommands\" href=\"#user-content-ferret-custom-autocommands\"\u003e\u003c/a\u003e\n\n\u003cp align=\"right\"\u003e\u003ca name=\"ferretasyncfinish\" href=\"#user-content-ferretasyncfinish\"\u003e\u003ccode\u003eFerretAsyncFinish\u003c/code\u003e\u003c/a\u003e \u003ca name=\"ferretasyncstart\" href=\"#user-content-ferretasyncstart\"\u003e\u003ccode\u003eFerretAsyncStart\u003c/code\u003e\u003c/a\u003e \u003ca name=\"ferretdidwrite\" href=\"#user-content-ferretdidwrite\"\u003e\u003ccode\u003eFerretDidWrite\u003c/code\u003e\u003c/a\u003e \u003ca name=\"ferretwillwrite\" href=\"#user-content-ferretwillwrite\"\u003e\u003ccode\u003eFerretWillWrite\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\nFor maximum compatibility with other plug-ins, Ferret runs the following \u0026quot;User\u0026quot; autocommands before and after running the file writing operations during \u003cstrong\u003e[`:Acks`](#user-content-acks)\u003c/strong\u003e or \u003cstrong\u003e[`:Lacks`](#user-content-lacks)\u003c/strong\u003e:\n\n- FerretWillWrite\n- FerretDidWrite\n\nFor example, to call a pair of custom functions in response to these events, you might do:\n\n```\nautocmd! User FerretWillWrite\nautocmd User FerretWillWrite call CustomWillWrite()\nautocmd! User FerretDidWrite\nautocmd User FerretDidWrite call CustomDidWrite()\n```\n\nAdditionally, Ferret runs these autocommands when an async search begins and ends:\n\n- FerretAsyncStart\n- FerretAsyncFinish\n\n## Overrides\u003ca name=\"ferret-overrides\" href=\"#user-content-ferret-overrides\"\u003e\u003c/a\u003e\n\nFerret overrides the 'grepformat' and 'grepprg' settings, preferentially setting `rg`, `ag`, `ack` or `ack-grep` as the 'grepprg' (in that order) and configuring a suitable 'grepformat'.\n\nAdditionally, Ferret includes an \u003cstrong\u003e`ftplugin`\u003c/strong\u003e for the \u003cstrong\u003e`quickfix`\u003c/strong\u003e listing that adjusts a number of settings to improve the usability of search results.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"ferret-nolist\" href=\"#user-content-ferret-nolist\"\u003e\u003ccode\u003eferret-nolist\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### 'nolist'\u003ca name=\"ferret-nolist\" href=\"#user-content-ferret-nolist\"\u003e\u003c/a\u003e\n\nTurned off to reduce visual clutter in the search results, and because 'list' is most useful in files that are being actively edited, which is not the case for \u003cstrong\u003e`quickfix`\u003c/strong\u003e results.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"ferret-norelativenumber\" href=\"#user-content-ferret-norelativenumber\"\u003e\u003ccode\u003eferret-norelativenumber\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### 'norelativenumber'\u003ca name=\"ferret-norelativenumber\" href=\"#user-content-ferret-norelativenumber\"\u003e\u003c/a\u003e\n\nTurned off, because it is more useful to have a sense of absolute progress through the results list than to have the ability to jump to nearby results (especially seeing as the most common operations are moving to the next or previous file, which are both handled nicely by \u003cstrong\u003e`:cnf`\u003c/strong\u003e and \u003cstrong\u003e`:cpf`\u003c/strong\u003e respectively).\n\n\u003cp align=\"right\"\u003e\u003ca name=\"ferret-nowrap\" href=\"#user-content-ferret-nowrap\"\u003e\u003ccode\u003eferret-nowrap\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### 'nowrap'\u003ca name=\"ferret-nowrap\" href=\"#user-content-ferret-nowrap\"\u003e\u003c/a\u003e\n\nTurned off to avoid ugly wrapping that makes the results list hard to read, and because in search results, the most relevant information is the filename, which is on the left and is usually visible even without wrapping.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"ferret-number\" href=\"#user-content-ferret-number\"\u003e\u003ccode\u003eferret-number\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### 'number'\u003ca name=\"ferret-number\" href=\"#user-content-ferret-number\"\u003e\u003c/a\u003e\n\nTurned on to give a sense of absolute progress through the results.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"ferret-scrolloff\" href=\"#user-content-ferret-scrolloff\"\u003e\u003ccode\u003eferret-scrolloff\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### 'scrolloff'\u003ca name=\"ferret-scrolloff\" href=\"#user-content-ferret-scrolloff\"\u003e\u003c/a\u003e\n\nSet to 0 because the \u003cstrong\u003e`quickfix`\u003c/strong\u003e listing is usually small by default, so trying to keep the current line away from the edge of the viewpoint is futile; by definition it is usually near the edge.\n\n\u003cp align=\"right\"\u003e\u003ca name=\"ferret-nocursorline\" href=\"#user-content-ferret-nocursorline\"\u003e\u003ccode\u003eferret-nocursorline\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### 'nocursorline'\u003ca name=\"ferret-nocursorline\" href=\"#user-content-ferret-nocursorline\"\u003e\u003c/a\u003e\n\nTurned off to reduce visual clutter.\n\nTo prevent any of these \u003cstrong\u003e`quickfix`\u003c/strong\u003e-specific overrides from being set up, you can set \u003cstrong\u003e[`g:FerretQFOptions`](#user-content-gferretqfoptions)\u003c/strong\u003e to 0 in your \u003cstrong\u003e`.vimrc`\u003c/strong\u003e:\n\n```\nlet g:FerretQFOptions=0\n```\n\n## Troubleshooting\u003ca name=\"ferret-troubleshooting\" href=\"#user-content-ferret-troubleshooting\"\u003e\u003c/a\u003e\n\n\u003cp align=\"right\"\u003e\u003ca name=\"ferret-quotes\" href=\"#user-content-ferret-quotes\"\u003e\u003ccode\u003eferret-quotes\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\n### Ferret fails to find patterns containing spaces\u003ca name=\"ferret-ferret-fails-to-find-patterns-containing-spaces\" href=\"#user-content-ferret-ferret-fails-to-find-patterns-containing-spaces\"\u003e\u003c/a\u003e\n\nAs described in the documentation for \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e, the search pattern is passed through as-is to the underlying search command, and no escaping is required other than preceding spaces by a single backslash.\n\nSo, to find \u0026quot;foo bar\u0026quot;, you would search like:\n\n```\n:Ack foo\\ bar\n```\n\nUnescaped spaces in the search are treated as argument separators, so a command like the following means pass the `-w` option through, search for pattern \u0026quot;foo\u0026quot;, and limit search to the \u0026quot;bar\u0026quot; directory:\n\n```\n:Ack -w foo bar\n```\n\nNote that wrapping in quotes will probably not do what you want.\n\nThis, for example, is a search for `\"foo` in the `bar\"` directory:\n\n```\n:Ack \"foo bar\"\n```\n\nand this is a search for `'abc` in the `xyz'` directory:\n\n```\n:Ack 'abc xyz'\n```\n\nThis approach to escaping is taken in order to make it straightfoward to use powerful Perl-compatible regular expression syntax in an unambiguous way without having to worry about shell escaping rules; for example:\n\n```\n:Ack \\blog\\((['\"]).*?\\1\\) -i --ignore-dir=src/vendor src dist build\n```\n\n## FAQ\u003ca name=\"ferret-faq\" href=\"#user-content-ferret-faq\"\u003e\u003c/a\u003e\n\n### Why do Ferret commands start with \"Ack\", \"Lack\" and so on?\u003ca name=\"ferret-why-do-ferret-commands-start-with-ack-lack-and-so-on\" href=\"#user-content-ferret-why-do-ferret-commands-start-with-ack-lack-and-so-on\"\u003e\u003c/a\u003e\n\nFerret was originally the thinnest of wrappers (7 lines of code in my \u003cstrong\u003e`.vimrc`\u003c/strong\u003e) around `ack`. The earliest traces of it can be seen in the initial commit to my dotfiles repo in May, 2009 (https://wincent.dev/h).\n\nSo, even though Ferret has a new name now and actually prefers `rg` then `ag` over `ack`/`ack-grep` when available, I prefer to keep the command names intact and benefit from years of accumulated muscle-memory.\n\n## Related\u003ca name=\"ferret-related\" href=\"#user-content-ferret-related\"\u003e\u003c/a\u003e\n\nJust as Ferret aims to improve the multi-file search and replace experience, Loupe does the same for within-file searching:\n\nhttps://github.com/wincent/loupe\n\n## Website\u003ca name=\"ferret-website\" href=\"#user-content-ferret-website\"\u003e\u003c/a\u003e\n\nSource code:\n\nhttps://github.com/wincent/ferret\n\nOfficial releases are listed at:\n\nhttp://www.vim.org/scripts/script.php?script_id=5220\n\n## License\u003ca name=\"ferret-license\" href=\"#user-content-ferret-license\"\u003e\u003c/a\u003e\n\nCopyright 2015-present Greg Hurrell. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \u0026quot;AS IS\u0026quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n## Development\u003ca name=\"ferret-development\" href=\"#user-content-ferret-development\"\u003e\u003c/a\u003e\n\n### Contributing patches\u003ca name=\"ferret-contributing-patches\" href=\"#user-content-ferret-contributing-patches\"\u003e\u003c/a\u003e\n\nPatches can be sent via mail to greg@hurrell.net, or as GitHub pull requests at: https://github.com/wincent/ferret/pulls\n\n### Cutting a new release\u003ca name=\"ferret-cutting-a-new-release\" href=\"#user-content-ferret-cutting-a-new-release\"\u003e\u003c/a\u003e\n\nAt the moment the release process is manual:\n\n- Perform final sanity checks and manual testing\n- Update the \u003cstrong\u003e[`ferret-history`](#user-content-ferret-history)\u003c/strong\u003e section of the documentation\n- Verify clean work tree:\n\n```\ngit status\n```\n\n- Tag the release:\n\n```\ngit tag -s -m \"$VERSION release\" $VERSION\n```\n\n- Publish the code:\n\n```\ngit push origin main --follow-tags\ngit push github main --follow-tags\n```\n\n- Produce the release archive:\n\n```\ngit archive -o ferret-$VERSION.zip HEAD -- .\n```\n\n- Upload to http://www.vim.org/scripts/script.php?script_id=5220\n\n## Authors\u003ca name=\"ferret-authors\" href=\"#user-content-ferret-authors\"\u003e\u003c/a\u003e\n\nFerret is written and maintained by Greg Hurrell \u0026lt;greg@hurrell.net\u0026gt;.\n\nOther contributors that have submitted patches include (in alphabetical order):\n\n- Andrew Macpherson\n- Daniel Silva\n- Filip Szymański\n- Joe Lencioni\n- Jon Parise\n- Nelo Wallus\n- Tom Dooner\n- Vaibhav Sagar\n- Yoni Weill\n- fent\n\nThis list produced with:\n\n```\n:read !git shortlog -s HEAD | grep -v 'Greg Hurrell' | cut -f 2-3 | sed -e 's/^/- /'\n```\n\n## History\u003ca name=\"ferret-history\" href=\"#user-content-ferret-history\"\u003e\u003c/a\u003e\n\n### main (not yet released)\u003ca name=\"ferret-main-not-yet-released\" href=\"#user-content-ferret-main-not-yet-released\"\u003e\u003c/a\u003e\n\n- Add \u003cstrong\u003e[`\u003cPlug\u003e(FerretBack)`](#user-content-plugferretback)\u003c/strong\u003e, \u003cstrong\u003e[`\u003cPlug\u003e(FerretBlack)`](#user-content-plugferretblack)\u003c/strong\u003e, and \u003cstrong\u003e[`\u003cPlug\u003e(FerretQuack)`](#user-content-plugferretquack)\u003c/strong\u003e targets for use in mappings (https://github.com/wincent/ferret/issues/79).\n- Fix hangs produced by options that take arguments in `rg` v13.0.0 (https://github.com/wincent/ferret/issues/82).\n- Fix \u003cstrong\u003e`E42`\u003c/strong\u003e and \u003cstrong\u003e`E684`\u003c/strong\u003e errors when deleting last item in listing, or trying to delete from an empty listing (https://github.com/wincent/ferret/issues/83).\n- Add \u003cstrong\u003e[`g:FerretCommandNames`](#user-content-gferretcommandnames)\u003c/strong\u003e (https://github.com/wincent/ferret/issues/75).\n\n### 5.1 (9 July 2021)\u003ca name=\"ferret-51-9-july-2021\" href=\"#user-content-ferret-51-9-july-2021\"\u003e\u003c/a\u003e\n\n- Add \u003cstrong\u003e[`g:FerretAckWordWord`](#user-content-gferretackwordword)\u003c/strong\u003e setting, to pass `-w` to the underlying search tool when \u003cstrong\u003e[`\u003cPlug\u003e(FerretAckWord)`](#user-content-plugferretackword)\u003c/strong\u003e is pressed (https://github.com/wincent/ferret/issues/66).\n- Use `:normal!` instead of \u003cstrong\u003e`:normal`\u003c/strong\u003e to avoid running custom mappings (patch from Yoni Weill, https://github.com/wincent/ferret/pull/67).\n- Append a trailing slash when autocompleting a directory name (https://github.com/wincent/ferret/issues/69).\n- Fixed failure to detect pre-existing mapping to \u003cstrong\u003e[`\u003cPlug\u003e(FerretLack)`](#user-content-plugferretlack)\u003c/strong\u003e.\n- Worked around breakage caused by `rg` v13.0.0 (https://github.com/wincent/ferret/issues/78).\n\n### 5.0 (8 June 2019)\u003ca name=\"ferret-50-8-june-2019\" href=\"#user-content-ferret-50-8-june-2019\"\u003e\u003c/a\u003e\n\n- The \u003cstrong\u003e[`\u003cPlug\u003e(FerretAcks)`](#user-content-plugferretacks)\u003c/strong\u003e mapping now uses \u003cstrong\u003e`/\\v`\u003c/strong\u003e \u0026quot;very magic\u0026quot; mode by default. This default can be changed using the \u003cstrong\u003e[`g:FerretVeryMagic`](#user-content-gferretverymagic)\u003c/strong\u003e option.\n- \u003cstrong\u003e[`:Acks`](#user-content-acks)\u003c/strong\u003e now preferentially uses \u003cstrong\u003e`:cdo`\u003c/strong\u003e (rather than \u003cstrong\u003e`:cfdo`\u003c/strong\u003e) to make replacements, which means that it no longer operates on a per-file level and instead targets individual entries within the \u003cstrong\u003e`quickfix`\u003c/strong\u003e window. This is relevant if you've used Ferrets mappings to delete entries from the window. The old behavior can be restored with the \u003cstrong\u003e[`g:FerretAcksCommand`](#user-content-gferretackscommand)\u003c/strong\u003e option.\n- Ferret now has a \u003cstrong\u003e[`:Lacks`](#user-content-lacks)\u003c/strong\u003e command, an analog to \u003cstrong\u003e[`:Acks`](#user-content-acks)\u003c/strong\u003e which applies to the \u003cstrong\u003e`location-list`\u003c/strong\u003e.\n- Likewise, Ferret now has a \u003cstrong\u003e[`:Largs`](#user-content-largs)\u003c/strong\u003e command, analogous to \u003cstrong\u003e[`:Qargs`](#user-content-qargs)\u003c/strong\u003e, which applies to the \u003cstrong\u003e`location-list`\u003c/strong\u003e instead of the \u003cstrong\u003e`quickfix`\u003c/strong\u003e window.\n- The Ferret bindings that are set-up in the \u003cstrong\u003e`quickfix`\u003c/strong\u003e window when \u003cstrong\u003e[`g:FerretQFMap`](#user-content-gferretqfmap)\u003c/strong\u003e is enabled now also apply to the \u003cstrong\u003e`location-list`\u003c/strong\u003e.\n\n### 4.1 (31 January 2019)\u003ca name=\"ferret-41-31-january-2019\" href=\"#user-content-ferret-41-31-january-2019\"\u003e\u003c/a\u003e\n\n- Added \u003cstrong\u003e[`:Quack`](#user-content-quack)\u003c/strong\u003e command, analogous to \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e but scoped to the files currently listed in the \u003cstrong\u003e`quickfix`\u003c/strong\u003e window.\n- Fixed option autocompletion.\n\n### 4.0.2 (11 January 2019)\u003ca name=\"ferret-402-11-january-2019\" href=\"#user-content-ferret-402-11-january-2019\"\u003e\u003c/a\u003e\n\n- Restore compatibility with versions of `rg` prior to v0.8 (https://github.com/wincent/ferret/issues/59).\n\n### 4.0.1 (8 January 2019)\u003ca name=\"ferret-401-8-january-2019\" href=\"#user-content-ferret-401-8-january-2019\"\u003e\u003c/a\u003e\n\n- Make \u003cstrong\u003e[`:Acks`](#user-content-acks)\u003c/strong\u003e behavior the same irrespective of the \u003cstrong\u003e`'gdefault'`\u003c/strong\u003e setting.\n\n### 4.0 (25 December 2018)\u003ca name=\"ferret-40-25-december-2018\" href=\"#user-content-ferret-40-25-december-2018\"\u003e\u003c/a\u003e\n\n- Try to avoid \u0026quot;press ENTER to continue\u0026quot; prompts.\n- Put search term in \u003cstrong\u003e`w:quickfix_title`\u003c/strong\u003e for use in statuslines (https://github.com/wincent/ferret/pull/57).\n- Add \u003cstrong\u003e[`g:FerretExecutableArguments`](#user-content-gferretexecutablearguments)\u003c/strong\u003e and \u003cstrong\u003e[`ferret#get_default_arguments()`](#user-content-ferretgetdefaultarguments)\u003c/strong\u003e (https://github.com/wincent/ferret/pull/46).\n\n### 3.0.3 (23 March 2018)\u003ca name=\"ferret-303-23-march-2018\" href=\"#user-content-ferret-303-23-march-2018\"\u003e\u003c/a\u003e\n\n- Fix for \u003cstrong\u003e[`:Lack`](#user-content-lack)\u003c/strong\u003e results opening in quickfix listing in Neovim (https://github.com/wincent/ferret/issues/47).\n\n### 3.0.2 (25 October 2017)\u003ca name=\"ferret-302-25-october-2017\" href=\"#user-content-ferret-302-25-october-2017\"\u003e\u003c/a\u003e\n\n- Fix broken \u003cstrong\u003e[`:Back`](#user-content-back)\u003c/strong\u003e and \u003cstrong\u003e[`:Black`](#user-content-black)\u003c/strong\u003e commands (https://github.com/wincent/ferret/issues/48).\n\n### 3.0.1 (24 August 2017)\u003ca name=\"ferret-301-24-august-2017\" href=\"#user-content-ferret-301-24-august-2017\"\u003e\u003c/a\u003e\n\n- Fix failure to handle search patterns containing multiple escaped spaces (https://github.com/wincent/ferret/issues/49).\n\n### 3.0 (13 June 2017)\u003ca name=\"ferret-30-13-june-2017\" href=\"#user-content-ferret-30-13-june-2017\"\u003e\u003c/a\u003e\n\n- Improve handling of backslash escapes (https://github.com/wincent/ferret/issues/41).\n- Add \u003cstrong\u003e[`g:FerretAutojump`](#user-content-gferretautojump)\u003c/strong\u003e.\n- Drop support for vim-dispatch.\n\n### 2.0 (6 June 2017)\u003ca name=\"ferret-20-6-june-2017\" href=\"#user-content-ferret-20-6-june-2017\"\u003e\u003c/a\u003e\n\n- Add support for Neovim, along with \u003cstrong\u003e[`g:FerretNvim`](#user-content-gferretnvim)\u003c/strong\u003e setting.\n\n### 1.5 \"Cinco de Cuatro\" (4 May 2017)\u003ca name=\"ferret-15-cinco-de-cuatro-4-may-2017\" href=\"#user-content-ferret-15-cinco-de-cuatro-4-may-2017\"\u003e\u003c/a\u003e\n\n- Improvements to the handling of very large result sets (due to wide lines or many results).\n- Added \u003cstrong\u003e[`g:FerretLazyInit`](#user-content-gferretlazyinit)\u003c/strong\u003e.\n- Added missing documentation for \u003cstrong\u003e[`g:FerretJob`](#user-content-gferretjob)\u003c/strong\u003e.\n- Added \u003cstrong\u003e[`g:FerretMaxResults`](#user-content-gferretmaxresults)\u003c/strong\u003e.\n- Added feature-detection for `rg` and `ag`, allowing Ferret to gracefully work with older versions of those tools that do not support all desired command-line switches.\n\n### 1.4 (21 January 2017)\u003ca name=\"ferret-14-21-january-2017\" href=\"#user-content-ferret-14-21-january-2017\"\u003e\u003c/a\u003e\n\n- Drop broken support for `grep`, printing a prompt to install `rg`, `ag`, or `ack`/`ack-grep` instead.\n- If an `ack` executable is not found, search for `ack-grep`, which is the name used on Debian-derived distros.\n\n### 1.3 (8 January 2017)\u003ca name=\"ferret-13-8-january-2017\" href=\"#user-content-ferret-13-8-january-2017\"\u003e\u003c/a\u003e\n\n- Reset \u003cstrong\u003e`'errorformat'`\u003c/strong\u003e before each search (fixes issue #31).\n- Added \u003cstrong\u003e[`:Back`](#user-content-back)\u003c/strong\u003e and \u003cstrong\u003e[`:Black`](#user-content-black)\u003c/strong\u003e commands, analogous to \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e and \u003cstrong\u003e[`:Lack`](#user-content-lack)\u003c/strong\u003e but scoped to search within currently open buffers only.\n- Change \u003cstrong\u003e[`:Acks`](#user-content-acks)\u003c/strong\u003e to use \u003cstrong\u003e`:cfdo`\u003c/strong\u003e when available rather than \u003cstrong\u003e[`:Qargs`](#user-content-qargs)\u003c/strong\u003e and \u003cstrong\u003e`:argdo`\u003c/strong\u003e, to avoid polluting the \u003cstrong\u003e`arglist`\u003c/strong\u003e.\n- Remove superfluous \u003cstrong\u003e`QuickFixCmdPost`\u003c/strong\u003e autocommands, resolving clash with Neomake plug-in (patch from Tom Dooner, #36).\n- Add support for searching with ripgrep (`rg`).\n\n### 1.2a (16 May 2016)\u003ca name=\"ferret-12a-16-may-2016\" href=\"#user-content-ferret-12a-16-may-2016\"\u003e\u003c/a\u003e\n\n- Add optional support for running searches asynchronously using Vim's \u003cstrong\u003e`+job`\u003c/strong\u003e feature (enabled by default in sufficiently recent versions of Vim); see \u003cstrong\u003e[`g:FerretJob`](#user-content-gferretjob)\u003c/strong\u003e, \u003cstrong\u003e[`:FerretCancelAsync`](#user-content-ferretcancelasync)\u003c/strong\u003e and \u003cstrong\u003e[`:FerretPullAsync`](#user-content-ferretpullasync)\u003c/strong\u003e.\n\n### 1.1.1 (7 March 2016)\u003ca name=\"ferret-111-7-march-2016\" href=\"#user-content-ferret-111-7-march-2016\"\u003e\u003c/a\u003e\n\n- Fix another edge case when searching for patterns containing \u0026quot;#\u0026quot;, only manifesting under dispatch.vim.\n\n### 1.1 (7 March 2016)\u003ca name=\"ferret-11-7-march-2016\" href=\"#user-content-ferret-11-7-march-2016\"\u003e\u003c/a\u003e\n\n- Fix edge case when searching for strings of the form \u0026quot;\u0026lt;foo\u0026gt;\u0026quot;.\n- Fix edge case when searching for patterns containing \u0026quot;#\u0026quot; and \u0026quot;%\u0026quot;.\n- Provide completion for `ag` and `ack` options when using \u003cstrong\u003e[`:Ack`](#user-content-ack)\u003c/strong\u003e and \u003cstrong\u003e[`:Lack`](#user-content-lack)\u003c/strong\u003e.\n- Fix display of error messages under dispatch.vim.\n\n### 1.0 (28 December 2015)\u003ca name=\"ferret-10-28-december-2015\" href=\"#user-content-ferret-10-28-december-2015\"\u003e\u003c/a\u003e\n\n- Fix broken \u003cstrong\u003e[`:Qargs`](#user-content-qargs)\u003c/strong\u003e command (patch from Daniel Silva).\n- Add \u003cstrong\u003e[`g:FerretQFHandler`](#user-content-gferretqfhandler)\u003c/strong\u003e and \u003cstrong\u003e[`g:FerretLLHandler`](#user-content-gferretllhandler)\u003c/strong\u003e options (patch from Daniel Silva).\n- Make \u003cstrong\u003e`\u003cPlug\u003e`\u003c/strong\u003e mappings accessible even \u003cstrong\u003e[`g:FerretMap`](#user-content-gferretmap)\u003c/strong\u003e is set to 0.\n- Fix failure to report filename when using `ack` and explicitly scoping search to a single file (patch from Daniel Silva).\n- When using `ag`, report multiple matches per line instead of just the first (patch from Daniel Silva).\n- Improve content and display of error messages.\n\n### 0.3 (24 July 2015)\u003ca name=\"ferret-03-24-july-2015\" href=\"#user-content-ferret-03-24-july-2015\"\u003e\u003c/a\u003e\n\n- Added highlighting of search pattern and related \u003cstrong\u003e[`g:FerretHlsearch`](#user-content-gferrethlsearch)\u003c/strong\u003e option (patch from Nelo-Thara Wallus).\n- Add better error reporting for failed or incorrect searches.\n\n### 0.2 (16 July 2015)\u003ca name=\"ferret-02-16-july-2015\" href=\"#user-content-ferret-02-16-july-2015\"\u003e\u003c/a\u003e\n\n- Added \u003cstrong\u003e[`FerretDidWrite`](#user-content-ferretdidwrite)\u003c/strong\u003e and \u003cstrong\u003e[`FerretWillWrite`](#user-content-ferretwillwrite)\u003c/strong\u003e autocommands (patch from Joe Lencioni).\n- Add \u003cstrong\u003e[`\u003cPlug\u003e(FerretAcks)`](#user-content-plugferretacks)\u003c/strong\u003e mapping (patch from Nelo-Thara Wallus).\n\n### 0.1 (8 July 2015)\u003ca name=\"ferret-01-8-july-2015\" href=\"#user-content-ferret-01-8-july-2015\"\u003e\u003c/a\u003e\n\n- Initial release, extracted from my dotfiles (https://github.com/wincent/wincent).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwincent%2Fferret","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwincent%2Fferret","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwincent%2Fferret/lists"}