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

WIP: Ported Cloud9 Find Replace Plugin to Ace Editor with Enhancements #5502

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

mkslanc
Copy link
Contributor

@mkslanc mkslanc commented Mar 12, 2024

Issue #, if available: #4006, #3932, #2869, #2059, #2751

Description of changes:
This pull request introduces a significant update to the Ace Editor by porting the Cloud9 Find Replace plugin). The integration of this plugin brings several key enhancements and fixes, improving the search and replace functionality within the Ace Editor environment. Below are the major changes and benefits included in this update:

  • Multiline Search Support
    Users can now perform searches across multiple lines, enhancing the editor's capability to handle complex search patterns and large blocks of text.
  • Highlighted Regex in Search Input
    The search interface highlights regular expressions within the search input box, providing immediate visual feedback and aiding in the construction of complex regex patterns.
  • Fixed Regex Lookahead
    This update fixes issues with regex lookahead operations, ensuring that advanced regex patterns are interpreted and executed correctly, thereby improving the accuracy and reliability of search results.
  • WebWorker for Non-blocking UI
    The search functionality now operates within a WebWorker, ensuring that the UI remains responsive even during extensive search operations. This enhancement significantly improves the user experience by preventing UI freezes during long-running searches.
  • Search Query History
    A history feature has been added to both the find and replace input elements. Users can easily access their previous search queries, making repetitive search and replace tasks more efficient and user-friendly.

Things to Improve:

  • Restrict MockWorker's Functions: For environments that do not support WebWorkers, it's suggested to impose certain restrictions on the MockWorker's capabilities to ensure the UI does not get blocked. This approach will help maintain UI responsiveness across all environments. Right now MockWorker is not anyhow restricted.
  • Preserve Case Option in Searchbox: Adding a preserveCase option to the searchbox will enhance the replace functionality, allowing users to maintain the case of the original text or match the case of the replacement text. This feature would provide more flexibility and control over text manipulation tasks.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@nlujjawal
Copy link
Contributor

This PR is adding the code for multi-line search as well. So me and @nightwing decided to use this PR's extra features as a follow up for 5675 PR.

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.

3 participants