How to force folder refresh in Sublime, when “Project > refresh” doesn't work?

后端 未结 4 532
忘了有多久
忘了有多久 2020-12-23 13:32

Especially when using an sftp drive (but this problem is also an issue with local drives, although thankfully not as frequent), the folders in the sidebar just keep

相关标签:
4条回答
  • 2020-12-23 13:46

    Try to Install this package: https://packagecontrol.io/packages/SideBarEnhancements

    1. Open the package folder. Main menu -> Preferences -> Package Control: -> Package Control: Install Package
    2. Search the keyword: Side​Bar​Enhancements
    3. Enjoy it

    After you install this plugin, you will see the refresh button in your sidebar option:

    0 讨论(0)
  • 2020-12-23 13:51

    This isn't going to be a very useful answer but it documents some early behaviour in Sublime Text that would solve your problem, assuming you need no later features from Sublime Text 2/3 (a big assumption indeed).

    Sublime Text 1 had the handy feature in the folder context menu to "Refresh folder". This cause an immediate indexing of only the specified directory (and subdirectories) which was a boon when using networked drives over high-latency connections.

    This was deprecated in Sublime Text 2.

    Version 1 is available here or by direct download here. It's not clear that these will be available indefinitely though, so this isn't necessarily a long-term solution.

    0 讨论(0)
  • 2020-12-23 13:56

    I have added this myself the other day. I constantly work in an environment where files in the project are changing before I can see them.

    Goto 'Preferences' menu -> 'Key Bindings' -> 'User' which will open a JSON file, add below code, save and close that file.

    { "keys": ["ctrl+f5"], "command": "refresh_folder_list" }
    

    It will work like charm 100%. Thanks for asking this question.

    0 讨论(0)
  • 2020-12-23 13:59
    1. Open Sublime Text.
    2. Select Preferences from the top menu and click Key Bindings – User. Here you will see a JSON file that should contain an array of objects (initially the array is empty). Every object will represent a shortcut.
    3. Add the following (new shortcut object) entry into the array (between the brackets):

      { 
          "keys"    : ["f5"], 
          "command" : "refresh_folder_list" 
      }
      

    You should be able to refresh the folders with F5.

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