Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle find and replace #517

Merged
merged 17 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"etch": "0.14.1",
"event-kit": "^2.5.3",
"exception-reporting": "file:packages/exception-reporting",
"find-and-replace": "https://github.com/atom-community/find-and-replace/archive/refs/tags/v0.220.1.tar.gz",
"find-and-replace": "file:packages/find-and-replace",
"find-parent-dir": "^0.3.0",
"focus-trap": "6.3.0",
"fs-admin": "0.19.0",
Expand Down Expand Up @@ -203,7 +203,7 @@
"dev-live-reload": "file:./packages/dev-live-reload",
"encoding-selector": "file:./packages/encoding-selector",
"exception-reporting": "file:./packages/exception-reporting",
"find-and-replace": "0.220.1",
"find-and-replace": "file:./packages/find-and-replace",
"fuzzy-finder": "1.14.3",
"github": "0.36.14",
"git-diff": "file:./packages/git-diff",
Expand Down
4 changes: 1 addition & 3 deletions packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ See [RFC 003](https://github.com/atom/atom/blob/master/docs/rfcs/003-consolidate
| **dev-live-reload** | [`./dev-live-reload`](./dev-live-reload) | |
| **encoding-selector** | [`./encoding-selector`](./encoding-selector) | |
| **exception-reporting** | [`./exception-reporting`](./exception-reporting) | |
| **find-and-replace** | [`pulsar-edit/find-and-replace`][find-and-replace] | |
| **find-and-replace** | [`./find-and-replace`][find-and-replace] | |
| **fuzzy-finder** | [`pulsar-edit/fuzzy-finder`][fuzzy-finder] | |
| **github** | [`pulsar-edit/github`][github] | |
| **git-diff** | [`./git-diff`](./git-diff) | |
Expand Down Expand Up @@ -100,8 +100,6 @@ See [RFC 003](https://github.com/atom/atom/blob/master/docs/rfcs/003-consolidate
| **whitespace** | [`./whitespace`](./whitespace) | |
| **wrap-guide** | [`./wrap-guide`](./wrap-guide) | |

[find-and-replace]: https://github.com/pulsar-edit/find-and-replace
[fuzzy-finder]: https://github.com/pulsar-edit/fuzzy-finder
[github]: https://github.com/pulsar-edit/github
[keybinding-resolver]: https://github.com/pulsar-edit/keybinding-resolver
[notifications]: https://github.com/pulsar-edit/notifications
Expand Down
20 changes: 20 additions & 0 deletions packages/find-and-replace/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2014 GitHub Inc.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17 changes: 17 additions & 0 deletions packages/find-and-replace/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Find and Replace package

Find and replace in the current buffer or across the entire project.

## Find in buffer

Using the shortcut <kbd>cmd-f</kbd> (Mac) or <kbd>ctrl-f</kbd> (Windows and Linux).
![screen shot 2013-11-26 at 12 25 22 pm](https://f.cloud.github.com/assets/69169/1625938/a859fa70-56d9-11e3-8b2a-ac37c5033159.png)

## Find in project

Using the shortcut <kbd>cmd-shift-f</kbd> (Mac) or <kbd>ctrl-shift-f</kbd> (Windows and Linux).
![screen shot 2013-11-26 at 12 26 02 pm](https://f.cloud.github.com/assets/69169/1625945/b216d7b8-56d9-11e3-8b14-6afc33467be9.png)

## Provided Service

If you need access the marker layer containing result markers for a given editor, use the `find-and-replace@0.0.1` service. The service exposes one method, `resultsMarkerLayerForTextEditor`, which takes a `TextEditor` and returns a `TextEditorMarkerLayer` that you can interact with. Keep in mind that any work you do in synchronous event handlers on this layer will impact the performance of find and replace.
85 changes: 85 additions & 0 deletions packages/find-and-replace/keymaps/find-and-replace.cson
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
'.platform-darwin':
'cmd-F': 'project-find:show'
'cmd-f': 'find-and-replace:show'
'cmd-alt-f': 'find-and-replace:show-replace'

'.platform-win32, .platform-linux':
'ctrl-F': 'project-find:show'
'ctrl-f': 'find-and-replace:show'

'.platform-darwin atom-text-editor':
'cmd-g': 'find-and-replace:find-next'
'cmd-G': 'find-and-replace:find-previous'
'cmd-f3': 'find-and-replace:find-next-selected'
'cmd-shift-f3': 'find-and-replace:find-previous-selected'
'cmd-ctrl-g': 'find-and-replace:select-all'
'cmd-d': 'find-and-replace:select-next'
'cmd-alt-e': 'find-and-replace:replace-next'
'cmd-e': 'find-and-replace:use-selection-as-find-pattern'
'cmd-shift-e': 'find-and-replace:use-selection-as-replace-pattern'
'cmd-u': 'find-and-replace:select-undo'
'cmd-k cmd-d': 'find-and-replace:select-skip'

'.platform-win32 atom-text-editor, .platform-linux atom-text-editor':
'f3': 'find-and-replace:find-next'
'shift-f3': 'find-and-replace:find-previous'
'ctrl-f3': 'find-and-replace:find-next-selected'
'ctrl-shift-f3': 'find-and-replace:find-previous-selected'
'alt-f3': 'find-and-replace:select-all'
'ctrl-d': 'find-and-replace:select-next'
'ctrl-e': 'find-and-replace:use-selection-as-find-pattern'
'ctrl-shift-e': 'find-and-replace:use-selection-as-replace-pattern'
'ctrl-u': 'find-and-replace:select-undo'
'ctrl-k ctrl-d': 'find-and-replace:select-skip'

'.platform-darwin .find-and-replace':
'shift-enter': 'find-and-replace:show-previous'
'cmd-enter': 'find-and-replace:confirm'
'alt-enter': 'find-and-replace:find-all'
'cmd-alt-/': 'find-and-replace:toggle-regex-option'
'cmd-alt-c': 'find-and-replace:toggle-case-option'
'cmd-alt-s': 'find-and-replace:toggle-selection-option'
'cmd-alt-w': 'find-and-replace:toggle-whole-word-option'

'.platform-win32 .find-and-replace, .platform-linux .find-and-replace':
'shift-enter': 'find-and-replace:show-previous'
'ctrl-enter': 'find-and-replace:confirm'
'alt-enter': 'find-and-replace:find-all'
'ctrl-alt-/': 'find-and-replace:toggle-regex-option'
'ctrl-shift-c': 'find-and-replace:toggle-case-option'

'.platform-darwin .project-find':
'cmd-enter': 'project-find:confirm'
'cmd-alt-/': 'project-find:toggle-regex-option'
'cmd-alt-c': 'project-find:toggle-case-option'
'cmd-alt-w': 'project-find:toggle-whole-word-option'

'.platform-win32 .project-find, .platform-linux .project-find':
'ctrl-enter': 'project-find:confirm'
'ctrl-alt-/': 'project-find:toggle-regex-option'
'ctrl-shift-c': 'project-find:toggle-case-option'

'.find-and-replace, .project-find, .project-find .results-view':
'tab': 'find-and-replace:focus-next'
'shift-tab': 'find-and-replace:focus-previous'

'.platform-darwin .find-and-replace .replace-container atom-text-editor':
'cmd-enter': 'find-and-replace:replace-all'
'.platform-darwin .project-find .replace-container atom-text-editor':
'cmd-enter': 'project-find:replace-all'

'.platform-win32 .find-and-replace .replace-container atom-text-editor':
'ctrl-enter': 'find-and-replace:replace-all'
'.platform-win32 .project-find .replace-container atom-text-editor':
'ctrl-enter': 'project-find:replace-all'

'.platform-linux .find-and-replace .replace-container atom-text-editor':
'ctrl-enter': 'find-and-replace:replace-all'
'.platform-linux .project-find .replace-container atom-text-editor':
'ctrl-enter': 'project-find:replace-all'

'.results-view':
'home': 'core:move-to-top'
'ctrl-home': 'core:move-to-top'
'end': 'core:move-to-bottom'
'ctrl-end': 'core:move-to-bottom'
Loading