Wish IDE: Find and Replace with CRLF, tab, etc

copanut

Member
Licensed User
Often it is highly desirable to search for text that contains special characters (e.g., CRLF, tab, etc) and/or replace with text that includes such characters. For example, suppose one wants to insert a common sub call following the appearance of a Try block. It is possible to distinguish instances of "Try" from "End Try" by including the leading tab character in the search, and it's possible to replace this with Try followed by a carriage return and a new line of code. This can be done in Notepad++ as follows:

1656297449105.png


For example, one can search for \n or \r in the text to match code that breaks across lines, or replace a line of code with two or more lines of code.

Right now, I copy the code to Notepad++, make the change, then copy it back, but would be awfully nice to have this feature integrated. Perhaps something comparable already exists in the IDE but I haven't found it.
 

AnandGupta

Expert
Licensed User
Longtime User
I also use UltraEdit (paid) for all types of text changes features like column mode, multiple line editing etc. which I need but does not exist in the B4X ide.
But I do not have complain as I think Erel has given us more or less enough features to use the ide which emphasizes more on B4X code syntax, function etc. help than on text manipulation.
 

copanut

Member
Licensed User
I also use UltraEdit (paid) for all types of text changes features like column mode, multiple line editing etc. which I need but does not exist in the B4X ide.
But I do not have complain as I think Erel has given us more or less enough features to use the ide which emphasizes more on B4X code syntax, function etc. help than on text manipulation.

I agree, of course, that the existing B4X product suite is wonderful and a remarkable accomplishment. However, this is a wishlist page, and certain wishes may be fairly easy to implement and yet have a profound impact on productivity and efficiency.

I may be wrong, but I think allowing these extended characters such as \r and \t in the search/replace dialog should be only a fairly minor adjustment to the existing IDE code, while the productivity enhancement would be substantial for many circumstances. As such, it seems a good candidate for a wishlist submission.

Imagine for example that you have a five line #if sequence for a particular build configuration and you want to introduce that sequence in 100 different subs. This can be accomplished with a simple search/replace operation instead of a workaround with a third party editor. With the existing IDE you cannot search for text that extends across multiple lines, replace a single line with multiple lines, replace multiple lines with a single line, nor make use of a leading tab character or newline character to help distinguish the search target (such as Try vs End Try, where the word Try does not distinguish, but "\tTry" is distinguishable from " Try". Many other examples are possible with the same simple principle.
 
Top