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

Clean up naming conventions project-wide #75

Merged
merged 16 commits into from
May 28, 2021
Merged

Clean up naming conventions project-wide #75

merged 16 commits into from
May 28, 2021

Conversation

maxbrunsfeld
Copy link
Collaborator

Closes #49
Closes #72

This PR makes three naming changes:

  • Module filenames - For all rust modules that have their own directories (such as the buffer module), move the module's root file outside of the module directory, and rename it to match the module. For example, this renames buffer/mod.rs to buffer.rs. This makes the file easier fine using the fuzzy finder.
  • BufferView module - This renames BufferView -> Editor. Previously, that type was our only view whose name ended with View. The word Editor is also just nicer to say and to type.
  • Context parameter names - Throughout the codebase, gpui context parameters (with types like AppContext, MutableAppContext, and ModelContext<T>) were named a mixture of app and ctx. This renames them all to cx.

@nathansobo nathansobo merged commit ff2ab4b into main May 28, 2021
@nathansobo nathansobo deleted the naming-cleanup branch May 28, 2021 22:42
SomeoneToIgnore added a commit that referenced this pull request Jul 14, 2023
Closes https://github.com/zed-industries/community/issues/75
Closes https://github.com/zed-industries/community/issues/1749

The PR 

* changes keybindings for `Editor && mode == auto_height` context:
before, `alt-enter` and `alt-shift-enter` added new lines in such
editors, including the one from buffer search.

New bindings are the same as in `Editor && mode == full` context.

* adds `search::SelectAllMatches` action and binds it to `Alt + Enter`
by default, to select all matches of a buffer search

The behavior mimics VSCode: we do not move the screen even if all
selections are out of the visible range (Cmd+G will navigate there) and
allow reselecting the results from both pane and search field, as long
as the search is not dismissed.

Release Notes:

- Added `search::SelectAllMatches` (`Alt + Enter` default) action to
place carets and select all buffer search results
([#75](https://github.com/zed-industries/community/issues/75),
[#1749](https://github.com/zed-industries/community/issues/1749)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Normalize module structure Rename all context parameters from ctx to cx
2 participants