- AuthorPosts
- July 26, 2010 at 11:04 pm #8794CrashNBurnMember
The Find Highlight feature is interesting, though I find it annoying more so than helpful in many cases.
I’d like to see an option, if possible, on the Find Dialog:
[X] Erase Find Highlight on Close.
Thanks.
July 27, 2010 at 2:42 am #8797Yutaka EmuraKeymasterHi CrashNBurn,
Thanks for your comments! You can also set “0” in the Character Space text box in the Display tab of configuration properties.
Thanks!
July 27, 2010 at 4:49 pm #8799CrashNBurnMemberThat particular setting [ character space: 0 ] appears to increase the spacing between each character of your current font…
The request was to have a checkbox on the Find-Dialog that can be easily toggled on/off so that when the Find-Dialog is closed the Find Highlights get cleared (when checked) and not cleared (when not checked).
July 27, 2010 at 8:29 pm #8800Yutaka EmuraKeymasterHi CrashNBurn,
I am sorry. I mean “Search Colors” text box, not “Character Space” in the Display tab of configuration properties.
Thanks!
July 27, 2010 at 11:33 pm #8804CrashNBurnMemberI didn’t want to disable the Find Highlight.
My request was to to automatically clear the Find Highlight when the Find Dialog was closed — if a checkbox on the find dialog was checked: [x] Clear Highlights.I solved it with AutoHotKey. The original AHK solution was Kludgy and didn’t work consistently.
Perhaps someone else will find some use for it.
Fixed clean code:;;
;; Script: EE_AutoClearFindHighlight.ahk
;; Author: MwM - Crash&Burn, 2010
;; Usage::
;; Automatically clear the Find Highlight when EmEditor's
;; Find Dialog is closed with the [Close] Button.
;;
;; Does not clear the Find Highlight if ESC, or the
;; Find Dialog's TitleBar [X] is used, nor if a modifier
;; key is held down when clicking [Close] (i.e. Shift)
;;
#SingleInstance, Force
#NoEnv
SetBatchLInes, -1
#ifWinActive, Find ahk_class #32770
{
~LButton::
; $ESC::
{
aParent := DllCall( "GetParent", UInt, WinExist("A") )
aParent := (( !aParent ) ? WinExist("A") : aParent )
WinGetClass, aClass, ahk_id \%aParent\%
if( aClass <> "EmEditorMainFrame3" )
return
if( A_ThisHotKey == "LButton" )
{
MouseGetPos, ,, aFind, aControl
if( aControl <> "Button16" )
return
KeyWait, LButton
Sleep, 50
ifWinExist, ahk_id \%aFind\%
return
WinWaitActive, ahk_class EmEditorMainFrame3
Send, !{F3}
}
;; If one wanted the Find Highlight to clear on ESC
;; Remove comment block below, and uncomment ESC above.
/*
*
else
if( A_ThisHotKey == "$ESC" ) ;; Not clearing Find Highlight on ESC, atm
{
Send, {ESC}
Sleep, 50
ifWinExist, ahk_id \%aFind\%
return
WinWaitActive, ahk_class EmEditorMainFrame3
Send, !{F3}
}
*
*/
return
}
return
}
August 17, 2010 at 6:39 am #8845CrashNBurnMemberUpdated Previous post with much cleaner/functional code.
August 26, 2010 at 1:06 pm #8881JibzMemberI quite like the way Notepad++ does this particular feature. As soon as you select a piece of text that could be an identifier, it will highlight all nearby matches, and when you deselect again the highlight is removed.
It is quite convenient for quickly seeing places a variable is referenced in a source file.
August 26, 2010 at 5:53 pm #8883Yutaka EmuraKeymasterHello Jibz,
I might add that feature in future versions of EmEditor.
Thanks for your comments!September 28, 2010 at 11:55 pm #9021CrashNBurnMemberI updated my AHK fix for this,
1) Automatically Clear the Find Highlight when you Click [Close] on the Find|Replace dialog.
2) Does NOT clear the Find highlight if:
—> you press keyboard {ESC} or
—> click [X] on Titlebar. or
—> Shift+Click, or Ctrl+Click.#ifWinActive, Find ahk_class #32770, &Search All Open Documents
{
$LButton:: IWA_32770_FindReplace( "{LButton Down}" )
$LButton UP:: IWA_32770_FindReplace( "{LButton Up}" )
return
}
#ifWinActive, Replace ahk_class #32770, Search All &Open Documents
{
$LButton:: IWA_32770_FindReplace( "{LButton Down}" )
$LButton UP:: IWA_32770_FindReplace( "{LButton Up}" )
return
}
WinGetParentClass(winTitle="A", winText="", exTitle="", exText="")
{
WinGetClass, wClass, \% "ahk_id " DllCall( "GetParent", "UInt", WinExist(winTitle, winText, exTitle, exText))
return wClass
}
IWA_32770_FindReplace(mKeyF)
{
EmEditorMainFrame3_sendKey:="!{F3}", EmEditorMainFrame3_control:="Button16"
ControlGetFocus, cgFocus
Send, \% ((wpClass:=WinGetParentClass()) && doKey:=(cgFocus==\%wpClass\%_control)) ? mKeyF : mKeyF
if( GetKeyState("Ctrl") || GetKeyState("Shift") )
return
Send, \% (doKey && (WinGetClass("A")==wpClass) && \%wpClass\%_sendKey) ? \%wpClass\%_sendKey : ""
return
} - AuthorPosts
- You must be logged in to reply to this topic.