Notepad ++键盘快捷键可切换“查找结果”窗口


25

是否有键盘快捷键可切换“查找结果”窗口?还是可以在“ 快捷方式映射器”中配置它?我似乎找不到设置。

Answers:


23

有时我找不到“搜索结果”窗口。我按F7键显示它,但是没有运气,我知道我也没有将窗户作为单独的窗户卸下。然后,有人建议我可能一直将其最小化到状态栏。因此,如果您不小心这样做了:

  1. 将鼠标移到状态栏的顶部
  2. 光标将变为垂直调整大小形状
  3. 用鼠标左键按住它,然后向上拖动以显示缺少的搜索结果窗口

另请注意,“搜索结果”窗口也可以停靠在窗口的左侧,右侧或顶部。如果将鼠标悬停在状态栏顶部时,如果没有显示垂直调整大小形状,请尝试将光标移到这些边附近。出现垂直状态栏后,只需单击鼠标左键,然后向内向窗口中心拖动以显示缺少的搜索结果窗口。

我希望这个建议可以帮助其他一些像我一样沮丧的人。


1
这很有趣...完全可以使用!
塞尔吉奥·弗洛雷斯

12

我只有一个答案-您可能已经知道了...

F7显示“搜索结果”窗口,并允许您从其跳至编辑部分并返回至该部分。但是我找不到隐藏/关闭它的方法。


8

无法直接在其中进行操作Notepad++,但是可以使用AutoHotKey进行操作。以下脚本将从F7仅打开的快捷方式转换为切换;如果尚未打开,则将其打开;如果尚未打开,则将其关闭。

这是脚本:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Ed Cottrell's AutoHotKey script for toggling the "Find Results" pane/window in Notepad++
; Released under the MIT License (http://opensource.org/licenses/MIT)
; Version: 1.1
; Release Date: January 15, 2014
; Released on Superuser.com: http://superuser.com/questions/700357/create-a-hotkey-keyboard-shortcut-to-close-the-notepad-find-results-window
; Also released at www.edcottrell.com/2014/01/11/toggle-find-results-window-notepad-hotkey/
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Turn F7 into a toggle for the Notepad++ search results window; currently it shows it, but doesn't hide it.
; The $ prevents this from firing itself
*$F7::
Open := 0
SetTitleMatchMode 2  ; AHK doesn't seem to recognize the window title otherwise
; See if Notepad++ is the active window or if the undocked results window (ahk_class #32770) is the active window
If WinActive("Notepad++")
{
    ; If the results pane is open, close it
    ; Button1 is the class name for the title bar and close button of the results pane when docked
    ControlGet, OutputVar, Visible,, Button1, Notepad++
    if ErrorLevel = 0
    {
        If OutputVar > 0
        {
            ; Found it docked
            Open := 1
            ; Get the size and coordinates of the title bar and button
            ControlGetPos, X, Y, Width, Height, Button1
            ; Set the coordinates of the close button
            X := Width - 9
            Y := 5
            ; Send a click
            ControlClick, Button1,,,,, NA x%X% y%Y%
        }
    }
}
; If it is undocked, use ahk_class #32770
else If WinExist("Find result ahk_class #32770")
{
    ; Found it undocked
    Open := 1
    ; Close it
    WinClose
}
; It's not open, so open it
if Open = 0
{
    SendInput {F7}
}
return

希望这可以帮助其他所有喜欢的人Notepad++

编辑以修复检测未停靠的窗口中的错误。


2
为了防止这种劫持在所有窗口的F7行为,把#IfWinActive ahk_class Notepad++对前*$F7::
斯科特ç


1

将“视图”始终设置在最上方,然后全屏显示。按Ctrl + F并进行搜索。搜索窗口应该出现在屏幕的某个角落。向上拖动并使其变大。关闭全屏(F11)。要重新附加主查找窗口,请双击“查找窗口”标题栏。


全屏(F11)
有所作为


0

切换搜索结果窗格的功能是一个奇怪的缺失功能。甚至更奇怪,因为有人编写了将代码分配给F7键正确行为的代码。您可以修补代码并自己编译,也可以下载他还提供的二进制文件(有点过时)。

http://sourceforge.net/p/notepad-plus/patches/220/

如果您希望在Notepad ++中切换搜索结果窗口,您所要做的就是将“搜索结果窗口”拖到页面的最右端,并通过释放鼠标控件将其放到该页面的最右端。我尝试了一下,并成功地工作了。


0

尝试选择``查看'',然后选择``始终在顶部''搜索栏将出现在监视器上(如果像我的一样,如果在屏幕底部,因为我几乎错过了它),然后将``查找''窗口拖回到记事本上++并将其停靠在您喜欢的程序中。


欢迎来到超级用户!请仔细阅读问题。您的答案没有回答原始问题。
DavidPostill

0

顶部的问题恰好与另一个被视为重复的非公开讨论有关。其他讨论中的问题是:“如何取消隐藏notepad ++搜索结果窗口?”

我也遇到了这个令人烦恼的问题,可惜这里没有答案对我有帮助。但是我设法在其他地方找到另一个答案,它可以解决我的问题。它可以在这里找到:

https://wordpress.org/support/topic/a-quick-question-about-finding-my-find-all-in-notepad

并且以防万一它被删除,这是解决方案:

  1. F11进入全屏模式,或单击“视图”>“切换全屏模式”。
  2. 最小化“查找”窗格的选项卡应出现在任务栏上,等待重新最大化。
  3. 最大化它,停靠它,并尝试不再隐藏它。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.