Drugmix wrote:KDJ,
Could you, please, mute FindReplaceEx.js when a user performs an erroneous search query by searching something up in selection when nothing is actually selected?
By muting I mean suppress the 'Search finished' popup.
Thanks in advance.
Posted: Mon Oct 17, 2016 7:58 pm
by KDJ
Instructor, Drugmix
In KDJ.zip is test version: FindReplaceEx_test.js. Please check how it works.
Posted: Wed Oct 19, 2016 10:37 am
by Drugmix
KDJ, thanks!
It seems to work fine, but the checkbox 'Check "in selection" if selection not empty' seems to do nothing.
I've got a few other ideas for FindReplaceEx.js that you might find interesting:
1. I hate alerts, especially
(such windows may be a huge PitA because they may get lost behind non-movable windows, like other non-modal windows that also block user's interaction with their parental windows until you close those non-modal ones)
, they are very annoying. It would be nice to get away from alerting user via modal-windows to alerting him by displaying that text right in the FindReplaceEx.js's window.
2. I don't know if that is fixable, but I believe that there should at least be an option to make replace all keep lines folding intact (currently, when executing 'replace all' - some folded items get unfolded).
3. I use the function that applies partial opacity to FindReplaceEx.js's window when it's not active. With high opacity level - it usually still annoys the view, so I use low level of opacity (high transparency) and when I click back to that window - sometimes I accidentally hit a button/checkbox/radiobutton/link/slider, which is annoying, because the first click is made blindly: I see the position of the window, but I don't really see its contents.
There are two ways to solve this problem:
a. make the window get full opacity when cursor hovers it (this may lead to annoyance caused by unintentional cursor moves triggering the blinking of that window, but adding a delay (like the window shouldn't appear if it was hovered for less than 1 sec) would solve this issue);
b. make the window ignore the first click if it was inactive when the click occurred: such a click should just activate the window and do just that and nothing else.
4. I believe it makes sense to make this window resizable, along with 'What' and 'With' input fields (make them multiline), because it is PitA to work with long and complex regex replacements when you can't see the whole expression with one glance.
p.s.: thanks for that script!
Posted: Wed Oct 19, 2016 5:20 pm
by KDJ
Drugmix wrote:... the checkbox 'Check "in selection" if selection not empty' seems to do nothing.
This CheckBox has the same effect as:
Options -> Settings -> Advanced -> Check "in selection" if selection not empty
And it works the same as in standard Find/Replace dialog.
To see the effect, you need to select more than one line.
Posted: Wed Oct 19, 2016 8:16 pm
by Drugmix
KDJ wrote:This CheckBox has the same effect as:
Options -> Settings -> Advanced -> Check "in selection" if selection not empty
And it works the same as in standard Find/Replace dialog.
To see the effect, you need to select more than one line.
Oh, I probably misunderstood what it does.
I thought it was supposed to alert the user that selection was empty if the user decided to search or search&replace something 'in selection'.
But now I realize it would be a quite useless thing to do and that setting probably makes the SearchReplaceEx.js ignore the selected search scope completely if there is anything selected and instead search in selection in that case.
Posted: Tue Nov 01, 2016 6:08 pm
by Sticher78
Вопрос по SelectionOpenInTab.js.
К примеру, я выделяю код в css-файле и жму "Скопировать в новый таб".
Как автоматом попросить его определять "Тему"?
Я про подсветку кода,типа "Html", "PhP", "CSS" и т.п..
Posted: Tue Nov 01, 2016 6:36 pm
by Skif_off
Sticher78
Посмотрите NewFilebyRecent.js: будет включена подсветка кода файла, из которого копируете.
Posted: Tue Nov 01, 2016 6:42 pm
by Sticher78
А как этот скрипт прикрутить к SelectionOpenInTab.js в вызове?
Sticher78
Я тоже не программист Хотя KDJ и добавил фичу, отвечу: прикручивать к SelectionOpenInTab.js не нужно, это независимый скрипт, запуск аналогичен
"Копировать в новый таб" Call("Scripts::Main", 1, "NewFilebyRecent.js") Icon("%a\AkelFiles\Icons\synchro.ico")
См. FAQ: Как пользоваться скриптами?
Традиционно в начале скриптов идёт комментарий с более-менее подробным описанием (в т.ч. поддерживаемых аргументов) и один или несколько примеров.