-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Replace All #545
Comments
The search and replace tool set are all features that are available in the underlying Qt library. There is no "find all" functionality, and the search feature itself is iterative. I can of course implement a "replace all" as a loop that just repeats the search/replace until the end, but I've avoided this so far because there's no practical way to preview the changes beforehand. The safest way to achieve this is to hit the replace keyboard shortcut multiple times to iterate through the document and inspect each replace first. So, essentially, the reason why this isn't implemented is that it may cause the user to make mistakes that can be tricky to revert. However, many other editors do this and leave it to the user to take that risk, so I am not strongly opposed to adding it. I'll look into it anyway. |
This would be a neat feature for minor characters, places and entities. Even if I'm not a 'discovery' writer. On my part however, using Linux, I managed without by securing the entire folder beforehand, finding all files with all the matching words and running sed on each file. Brutal I know, but it was for a minor character and I'm not that far into the novel. Plus it worked like a charm. Late changes would be nice though via the novelWriter, even without an actual preview on the changes. Wouldn't be much better than my early approach, but I'd personally trust the available search and replace in a loop over all pages way more over a hacky fgrep + sed after a long night of writing. |
In the upcoming release I've improved the search/replace tool to at least show the number of occurrences in the current document. It makes it a little easier to see upfront what's going on. Feature #894 asks for a global search feature, which can fairly easily be extended to a global replace feature. I'm still not thrilled about the potential risk of an ill formatted search messing up someone's project, so some form of preview of the results are needed. It's not a trivial tool to write though. |
As a discovery writer, I want to be able to quickly and efficiently change the name of characters in my early drafts (for example, from John Smith, to James Doe).
The existing search and replace tools (match whole worlds, preserve case, etc.) are impressively powerful, but I would like the option of being able to replace all occurances within a document.
The text was updated successfully, but these errors were encountered: