This project was converted from https://github.com/geksilla/atom-fuzzy-grep.
Note: Due to porting from coffeescript, the feature has not been fully tested and there may be unknown bugs.
Atom-search-everywhere performs a full-text search of the project, similar to InfinJ IDEA's Find-in-Path.
Enter a regular expression in the input, full-text search results for the project from active text editor will be displayed.
Currently supports three searchers:
gitgrep
. Use the git grep command to search. Faster, can eliminate files that do not need to be searched (by identifying the .gitignore file).grep
. Search using grep, ag, pt, etc. High performance, but may search for files that should not be searched.builtin
. Use the built-in search API of atom. Slow speed and good compatibility. Suitable for use in unfamiliar system environments.When searching, it will intelligently detect the appropriate searcher.
The default detection order is gitgrep, grep, builtin
, and it can be modified by the custom searcherPriority
option.
apm install atom-search-everywhere
Or search via Settings View -> Install
Hit ctrl-alt-g
or , f f
in vim-mode to toggle panel.
To open dialog with last searched string there is the command search-everywhere:toggleLastSearch
. You can map it in your keymap.cson
:
'atom-workspace':
'ctrl-alt-shift-g': 'search-everywhere:toggleLastSearch'
You can specify any command you want by Grep Command String option in package settings, ag is used by default.
If you want to setup another one instead of ag here few examples:
pt -i --nocolor --nogroup --column
ack -i --nocolor --nogroup --column
grep -r -n --color=never
rg -i -n -H --no-heading --column
git grep -n -E
git grep
used by default for git projects if you don't want to use it uncheck Detect Git Project And Use Git Grep option in package settings.
Check package settings for more info.
Untitled
first project root path used.Name | Selector | Key Map | Description |
---|---|---|---|
search-everywhere:toggle | atom-workspace |
'ctrl-alt-g' | Open search dialog start typing and select item |
search-everywhere:toggleLastSearch | atom-workspace |
none | Open dialog with last search string |
search-everywhere:toggleWordUnderCursor | atom-workspace |
'cmd-*' | Open dialog with word under cursor |
search-everywhere:pasteEscaped | body.platform-linux atom-workspace .atom-search-everywhere atom-text-editor, body.platform-win32 atom-workspace .atom-search-everywhere atom-text-editor |
'ctrl-v' | Paste text to dialog and escape it, you can disable this behavior with atom-search-everywhere.escapeOnPaste config |
search-everywhere:pasteEscaped | body.platform-darwin atom-workspace .atom-search-everywhere atom-text-editor |
'cmd-v' | Paste text to dialog and escape it, you can disable this behavior with atom-search-everywhere.escapeOnPaste config |
Name | Default | Type | Description |
---|---|---|---|
atom-search-everywhere.minSymbolsToStartSearch | 3 | number | Start search after N symbol |
atom-search-everywhere.maxCandidates | 100 | number | Maximum count of displayed items |
atom-search-everywhere.grepCommandString | 'ag -i --nocolor --nogroup --column' | string | Grep command |
atom-search-everywhere.searcherPriority | "gitgrep", "grep", "builtin" | array | The plugin will look up the first available searcher in order for the search. |
atom-search-everywhere.gitGrepCommandString | 'git grep -i --no-color -n -E' | string |
git grep command used when detectGitProjectAndUseGitGrep is true |
atom-search-everywhere.preserveLastSearch | true | boolean | Use last search string as input for search dialog |
atom-search-everywhere.escapeSelectedText | true | boolean | Escape special characters when dialog opened with selected text |
atom-search-everywhere.showFullPath | false | boolean | Show full file path instead of file name |
atom-search-everywhere.inputThrottle | 50 | integer | Input throttle |
atom-search-everywhere.escapeOnPaste | true | boolean | Escape pasted text |
Feel free to open issue or send pull request.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.