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

find/replace in code editor #4

Open
jimy-byerley opened this issue Dec 23, 2023 · 2 comments
Open

find/replace in code editor #4

jimy-byerley opened this issue Dec 23, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jimy-byerley
Copy link
Owner

This feature is missing since the first day, it must be implemented on the model of kate's find/replace

@jimy-byerley jimy-byerley added enhancement New feature or request good first issue Good for newcomers labels Dec 23, 2023
@Senume
Copy link

Senume commented Dec 23, 2023

Hi,
I wish to solve the issue. Can you elaborate on feature you wanted to add ?

@jimy-byerley
Copy link
Owner Author

Hello and welcome here !
You have been fast, I almost posted this issue that you already answered ^^

What I had in mind was a tool to find and replace strings in the edited file, just like in most code editors. I think we could mimic the kate editor for this, which is quite ergonomic

  • Ctrl+F opens the find panel if not already opened. It shows at the bottom of the text view:
    image
    you can notice

    • the string text entry
    • previous finding / next findings buttons
    • case-sensitiveness button
    • when clicking the settings, it is openning the find/replace panel and closing the find panel
  • Ctrl+R opens the find/replace panel if not already opened
    image
    This panel can find or find&replace depending on the button that is clicked, and it has more options than the previous one

All this is mostly Qt panelling stuff. The only tricky stuff is modifying the code without messing with the dynamic interpreter uimadcad hold in order to reexecute only modified portions of code.

I think interacting with the QTextDocument and leaving its callbacks update the dynamic interpreter handle the events should be good at the moment we disable on-line-change execution trigger during the find/replace operations.

What do you think ot this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants