"Find in Files" - copy to search field AND execute find

"Find in Files" - copy to search field AND execute find

3

    Sep 14, 2015#1

    I would like to execute a 'find in files' with fewer operations. Currently, I have to select something, click 'find in files' and then go over and click the 'find' button. I would like 'find in files' to copy the selection to the "Find What" box and execute.

    6,600548
    Grand MasterGrand Master
    6,600548

      Sep 15, 2015#2

      For making this process faster, don't move your hand from keyboard to mouse, use the keyboard to execute Find in Files.

      First, select the text to search with keyboard, see Which methods exist to select a text range or block?

      By default the hotkey Ctrl+Shift+F is assigned to command SearchFindInFiles which can be changed in Key Mapping configuration dialog. So press this hotkey after making the selection with keyboard.

      By default Windows hides the underlines displaying which key sets focus to an option in a dialog or triggers a button click (or opens a menu or executes a menu command). This could be changed in Windows desktop settings to get the underlines always displayed. Press once left key Alt and hold it. It can be seen in English UltraEdit that on button Find the letter N is the mnemonic key for button click. So press next Alt+N to execute Find in Files.

      Summary: text selection + Ctrl+Shift+F + Alt+N runs a Find in Files with currently selected text.

      Hint: Assigning Alt+N to command SearchFindInFiles in addition or replacing Ctrl+Shift+F makes it possible to execute Find in Files with selected text by pressing and holding left Alt and pressing twice additionally key N.


      It is possible to speed this up a little bit and combine Ctrl+Shift+F + Alt+N to a single hotkey by recording a single Find in Files with the options you usually use into a macro using Macro - Record and Macro - Stop Recording and assigning a hotkey for this macro. As search string in Find in Files use ^s which means selected text, but which works only for non regular expression finds (and with UltraEdit regular expression finds whereby the selected text is interpreted as UE regular expression string).

      This recorded macro is saved perhaps together with other already loaded or recorded macros into a macro file which is next configured with Macro - Set Auto Load to be automatically loaded at startup of UltraEdit. Then the hotkey of the macro can be pressed to execute a Find in Files with the recorded options using the currently selected text. The macro can be even enhanced by a manual edit to check if there is a selection on execution and if this is not the case, select automatically the word at caret position before running Find in Files. This would make it possible to search for word at caret position without a manual select before macro execution.
      Best regards from an UC/UE/UES for Windows user from Austria