skip to Main Content

I realize that Microsoft had some sort of reason for adding the new "Find" tool in the folder EXPLORER section of VSC.. but… I’m a creature of habit. When I click on a file and then press Ctrl+F, I immediately start typing the value I’m looking for. The results used to look like this in the file editor pane…

enter image description here

But with my last update, when I click on the file in the EXPLORER and press Ctrl+F, I am now getting this NEW small tool in the EXPLORER pane, and the cursor goes THERE. I type away and nothing happens in the file editor until I swear a few near-curse-words and have to click over in the file editor and then press Ctrl+F again and start all over to type the search string. It’s bugging me because its old habit.

enter image description here

How can I go back to the old way of how it worked? Is there a simple configuration buried somewhere I can change?

Thanks.

2

Answers


  1. I don’t say see a setting to set the old filter-search method as the default in the Explorer. You can disable the list.find command on which the new find widget in the Explorer depends in your keybindings.json which has the effect you want:

      {
        "key": "ctrl+f",
        "command": "-list.find",
        // "when": "listFocus && listSupportsFind"
      }
    

    Now Ctrl+F with focus in the Explorer will open the editor Find Widget with focus.

    But you lose the ability to filter other lists with the Ctrl+F, such as TreeViews (see https://stackoverflow.com/a/73039598/836330 forexample).


    The better solution, IMO, is to set up a macro which works when you have explorerFocus and use the Ctrl+F keybinding. You will need a macro extension, like multi-command. Use this keybinding in your keybindings.json:

    {
      "key": "ctrl+f",
      "command": "extension.multiCommand.execute",
      "args": {
        "sequence": [
          "workbench.action.focusActiveEditorGroup",
          "actions.find",
        ],
        "when": "explorerFocus"
      },
    }
    

    which will switch focus to your current editor and then open the Find Widget therein.

    Login or Signup to reply.
  2. I will provide three steps to achieve this without editing keybindings.json

    Step 1: Open keyboard shortcuts
    Step 2: Find list.find using the search bar.
    Step 3: Change key-binding to f3. If there are multiple bindings f3 and ctrl+f like it was for me, remove ctrl+f key-binding.
    Done.

    You can open keyboard shortcuts by:

    1. ctrl + k ctrl + s
    2. Open palette ctrl + shift + p, type open keyboard shortcuts.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search