Refresh Visual Studio Code list of files

后端 未结 11 1751
一生所求
一生所求 2021-01-31 07:11

Visual Studio Code (Version 0.10.11, on OSX) does not refresh the files in a folder. Is there any way to force it to refresh. Currently I have to close and reopen the whole pr

相关标签:
11条回答
  • 2021-01-31 07:14

    If you use the SFTP extension you can do this for refreshing the SFTP:EXPLORER list (tested on Windows with VSC 1.40.2):

    File => Preferences => Keyboard Shortcuts => Search for: refresh

    Then you have to find "Refresh / sftp.remoteExplorer.refresh" in the result list. Click the entry, then click the plus sign before the entry, then press your desired shortcut and hit "enter". I took "Ctrl + Alt + F5" because this has not been used for other commands already.

    0 讨论(0)
  • 2021-01-31 07:16

    If you hover over the workspace root in the navigator, four icons appear to the right of it. The third of those icons, a circular arrow, is Refresh -- it reloads the file list.

    0 讨论(0)
  • 2021-01-31 07:18

    You can use the command palette to reload the window:

    1. Open the command palette with View > Command Palette... (or Shift+Cmd+P on OS X)
    2. Type reload window and press enter
    0 讨论(0)
  • 2021-01-31 07:18

    As the others stated, it is refreshing the file explorer and NOT the window. So you have maybe in your keybindings.json:

     {
        "key": "ctrl+f5",
        "command": "workbench.action.reloadWindow",
        "when": "editorTextFocus"
      },
      {
        "key": "ctrl+f6",
        "command": "workbench.files.action.refreshFilesExplorer"
      }
    
    0 讨论(0)
  • 2021-01-31 07:24

    You shouldn't need to reload the entire window, just the folder list. Reloading the window will kill terminals, lose undo history, etc. You can do this using the refresh button in the explorer (second from the right):

    If you find you need to do this a lot you can add a keybinding for it, for example:

    {
      "key": "ctrl+f5",
      "command": "workbench.files.action.refreshFilesExplorer"
    }
    
    0 讨论(0)
  • 2021-01-31 07:24

    When search.maintainFileSearchCache option is enabled I started to find the files with I'm using Ctrl-P shortcut

    0 讨论(0)
提交回复
热议问题