停止PyCharm从自动插入所选文本到搜索框 [英] Stop PyCharm From Auto-Inserting Selected Text to Search Box
问题描述
使用热键执行搜索时,PyCharm会自动将选定的文本粘贴到搜索框中.
如何停止这种行为,以便在打开带有选择的搜索框时不会自动将其粘贴到搜索框中?
作为一个示例,这是一个快照,其中我突出显示了源代码并打开了搜索框.您会看到所选文本已自动插入搜索栏中.
考虑PyCharm的工作方式,最简单的方法是
这是一个简单的两步过程,请转到 Edit
>
Macros
>
开始选择了某些文本的宏录制"
,请按 Ctrl + F 和退格键,然后再次转到 Edit
>
宏
>
停止宏录制
.保存marco并命名.
下一步,重新绑定 Ctrl + F
这将完全按照问题的要求提供查找功能.
When using a hotkey to perform a search, PyCharm will automatically paste selected text into the search box.
How can I stop this behavior so that when I open the search box with a selection made, it isn't auto pasted into the search box?
As an example, this is a snapshot where I had source code highlighted and opened the search box. You can see that the selected text was automatically inserted into the search bar.
Considering how PyCharm works the easiest way to do this is recording a macro and rebinding the Find
Ctrl + F keyboard shortcut.
If you press Ctrl + Shift + A or go to File
>
Settings
>
Keymap
and carefully examine all the Find
actions they all have the functionality of pasting the selected text into the search box. That can't be changed. So the alternative is recording a marco that combines the Ctrl + F action with a backspace to clear the search box.
It's an easy 2 step process, go to Edit
>
Macros
>
Start Macro Recording
having some text selected, press the Ctrl + F and backspace and again go to Edit
>
Macros
>
Stop Macro Recording
. Save the marco and give it a name.
Next rebind the Ctrl + F keyboard shortcut to your macro by going to File
>
Settings
>
Keymap
>
Macros
.
This gives the find functionality exactly as requested in the question.
这篇关于停止PyCharm从自动插入所选文本到搜索框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!