Posted by: vbr | Date: 2006-10-13 12:14 | IP: IP Logged
Quote:I'd really like to replace the ctrl-f hotkey for searching ...
You can use the parameter of "addMenuItem" in the scriptfile. (I set an alternative shortcut instead of replacing the default.) Maybe assigning to an existing shortcut could cause problems, or it could be necessary to remove it in Settings : Key Map.
addMenuItem "Multiline Search / Replace", "", "phReplace","Ctrl+Alt+F"
Edited 3 time(s). Last edit at 2006-10-13 12:20 by vbr.
Posted by: phdesigner | Date: 2006-10-17 07:41 | IP: IP Logged
New version of phReplace available at (http://www.phdesign.com.au/document.php?page=software_phreplace).
Changes include vbr's shift-left idea to find the start of a selection block, remembering the last window position when closed, fixed bug when trying to open phReplace if no document is open, replacing text within a selection with longer text (MrSpocks bug), highlighting all text in search box when starting, enabling pressing esc to exit the window, added the pspad icon and tried to add keyboard shortcuts to the buttons but this didn't seem to work on some systems.
Haven't forgotten about regular expressions either but it may be a week till I can spend some more time on it.
Keep the feedback coming.
Posted by: vbr | Date: 2006-10-17 09:43 | IP: IP Logged
Thanks for the new version.
If I modify the last lines of phreplace.vbs as follows:
addMenuItem "Multiline Search / Replace", "", "phReplace", "Alt+Shift+F"
(instead of the current code:
addMenuItem "Multiline Search / Replace", "", "phReplace"
and recompile the scripts, the shortcut Alt+Shift+F works for me.
Setting Ctrl+F (not really intended by me) doesn't work however, as there is a shortcut set in Program settings - Key map - Search.
Maybe it could be necessary to clear these settings first in case of such a conflict, (I guess).
Posted by: MrSpock | Date: 2006-10-17 10:55 | IP: IP Logged
Thank you. Gonna give it a try ASAP.
Posted by: MrSpock | Date: 2006-10-17 11:44 | IP: IP Logged
Again, thanks for sharing this tool. I did a few test with the new version and didn't find anything to complain about. It is already extremely useful as it is now. Additional support for regular expressions would make it an uber-utility.
Keyboard shortcuts (including the Escape key) work great for me.
Posted by: phdesigner | Date: 2006-10-19 03:22 | IP: IP Logged
Thanks for the help with hot keys vbr, I've set the default key to be Ctrl+Alt+F, I think you're right that it could cause some issues using Ctrl+F, I'll leave it up to the user to change the default key mapping if they really want to.
I've also removed the maximise and minimise buttons as per your suggestion MrSpock, I found that if you tried minimising phReplace it actually minimised PSPad as well which is definitely not expected behaviour so it's better not to have them.
Posted by: vbr | Date: 2006-10-19 08:53 | IP: IP Logged
Thanks for the new version 1.1.9 (From your post I wasn't quite sure, if you have allready uploaded it, but I found it actually on your page).
So maybe as a hint for other users:
Posted by: Joe Belmaati | Date: 2006-10-19 19:39 | IP: IP Logged
Outstanding work. The indentation bug is gone. Also, thanks for adding the feature that remembers the last window postition. If you could add the ability to save the last window size that would be even better. Real nit-picky, I know. Great utility. I'm going to use it a lot :D
Posted by: Arthur | Date: 2006-10-20 10:40 | IP: IP Logged
Great add-on, very useful.
1. As already stated can window size be remembered
2. Window position: on my system (WinXP Pro) the window jumps to it's position it is very annoying I suspect this is has to do with the sequence in which the code is written:
"create window, open window, set position"
maybe it can be changed to:
"create window, set position, open window"
3. Since it is a multi line search and tab key behaves as it suppose to in editor there is no way to jump through the dialog with a keyboard. Can Shift+Tab be set to act as Tab key when you in the Search/Replace fields?
4.When the dialog called with active selection shouldn't the "Selected Text Only" option be already checked
5.Can it have the same function, as Search dialog, damping search results list to log window ([List] button)
Posted by: Anders | Date: 2006-10-22 15:57 | IP: IP Logged
Some feedback (some might have been suggested before):
* "modeless form" would be *really* usefull
* "search-as-you-type" - this can be a checkbox. When checked the search is performed upon keypress - a la Firefox
* Shortcut CTRL+ENTER for performing a search
* No max-width for the textboxes - so you can shrink the window even more without hiding the settings
And a bug report:
Doing a replce on many items causes phReplace to hang: Run-time error "6" Overflow.