Update
Command line "TitlePart ClassWindow CurrentWord TestFlag" supported for 3rd party Scintilla editors.
Now you can use the same executable for PureBasic, SciTE, Notepad++. In the description of the program, I added configuration files for SciTE and Notepad++
Video of how it works
Show all occurrences of a word in the IDE
Re: Show all occurrences of a word in the IDE
Update (download)
When searching for tmp$ variables, the \$ character is escaped and as a result I get tmp\$
Two regular expressions for searching strings
The search for which procedure a word is in can be speeded up by obtaining the positions of all procedures and line numbers in one pass through the file, and then compare whether the word is inside the positions that are marked as the beginning and end of the procedure. This is faster than searching backwards, as it forces you to navigate through the same text multiple times.
Uploaded it again. Improved the source code for Linux
When searching for tmp$ variables, the \$ character is escaped and as a result I get tmp\$
Code: Select all
; Escape metacharacters in SelectedWord
rex1 = CreateRegularExpression(#PB_Any, "[][{}()*+?.\\^$|=<>#]", #PB_RegularExpression_NoCase)
If rex1
Text\s = SelectedWord
RegexReplace2(rex1, @Text, "\\0")
SelectedWord = Text\s
FreeRegularExpression(rex1)
EndIf
Code: Select all
AddGadgetItem(#cmbRex, -1, "(?# String )(?m)~?" + #q$ + ".*?[^\\]" + #q$)
AddGadgetItem(#cmbRex, -1, "(?# ~String )(?m)~" + #q$ + ".*?[^\\]" + #q$)
Uploaded it again. Improved the source code for Linux