sublime text 3 sidebar autoupdating not working

前端 未结 16 1506
失恋的感觉
失恋的感觉 2020-12-30 21:00

I was wondering if anyone could tell me how to make it so that sublime text 3 automatically updates the sidebar when i add a new folder/file to the current project in finder

相关标签:
16条回答
  • 2020-12-30 21:15

    I don't have a solution but a theory on why this is happening. I noticed as well recently that it stopped refreshing. I've also noticed that when I use the finder to open folders or use the 'open' within any program, the OS would just show an empty directory when I know there are files in it. I would then have to select a few different folders to get it to recognize that I'm asking it to show me the contents in the folder. It's almost like that function is asleep and I have to nudge it awake.

    It seems Mavericks is using some strong sleep agent and turning off any functions behind the scene that's not needed and perhaps it's also affecting the sidebar refresh.

    0 讨论(0)
  • 2020-12-30 21:16

    I had this same issue. You could always bind the folder refresh to a hotkey. While this is not a complete fix for auto-updating, it still saves you from a more lengthy manual refresh. I believe this is how Dreamweaver works as well.

    0 讨论(0)
  • 2020-12-30 21:18

    Same issue for me with ST2 on OSX 10.7.5. I started by opening Finder to the folder where I had the issue and navigated to that folder in terminal as well. Then:

    1. Create a blank file and observe if Finder refreshed.

      echo "" > test.txt

    2. If Finder didn't refresh, navigate to the parent folder in both Finder and terminal. Repeat step 1.

    3. If Finder did refresh, rename the child folder you came from to anything and then back to the original name.

      mv folder_name new_folder_name

      mv new_folder_name folder_name

    4. Auto refresh in Finder started working again as well as the Sublime sidebar for that folder and all child folders.

    I don't have an explanation as to why this issue started. Prior to this solution, I attempted the following trying to figure it out. I don't know if these steps were necessary in resolving this issue.

    1. I removed .DS_Store files from the folders with this issue.

    2. Remove the Finder preferences file and restart Finder. As described here.

      rm ~/Library/Preferences/com.apple.finder.plist ; killall Finder

    3. Exit Dropbox

    Thanks to @peresleguine for the suggestion of renaming the folder.

    0 讨论(0)
  • 2020-12-30 21:20

    I had the same issue with ST3 (OSX 10.9.2). It was something wrong with the root folder of my projects. I created new folder Code1, moved all of my projects there, removed old Code folder and renamed new Code1 to Code. This bit of magic returned things back to normal.

    0 讨论(0)
  • 2020-12-30 21:21

    I'm using Windows, so not sure if my solution is relevant to the exact question, but since I found this on Google, I figured it might just help somebody. My problem was specifically with the SideBarEnhancements plugin.

    The dumb solution (try this first):

    1. Close Sublime Text, go to the Packages directory (in Windows that's in %HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Sublime Text 3 (Win+R, paste that path, enter);
    2. Rename SideBarEnhancements to something else and then back to its original name;
    3. Reopen Sublime Text.

    The nice solution (for Git Bash on Windows):

    IF the dumb solution has not worked, there is no point in following on.

    However, if it worked, you can automate the process.

    1. Open %HOMEDRIVE%%HOMEPATH%\.bashrc, or in other words: User\.bashrc (create the file if you don't have it);

    2. Paste the following at the end of the file (preferably on a new line):

      touchme() {
          echo 'Killing Sublime Text process..';
          taskkill -IM "sublime_text.exe";
          cd ~/AppData/Roaming/Sublime\ Text\ 3/Packages;
          touch SideBarEnhancements;
          echo 'SideBarEnhancements folder touched;';
          echo 'Returning to original directory..';
          cd -;
          echo 'Reopening Sublime Text..';
          "/L/Program Files/Sublime Text 3/sublime_text.exe"&
      }
      

    1. Change the path to your sublime_text.exe (last line of the function);
    2. If Git Bash is opened, execute source ~/.bashrc and go to 6;
    3. If Git Bash is not opened, open it and go to 6;
    4. Execute touchme without any brackets;
    5. In case you use the touchme command for something else, or simply don't like it, feel completely free to rename the function (I just found it the easiest to write and remember :P).

    I guess the code above can be adapted for Unix systems, too, with some small tweaks.

    0 讨论(0)
  • 2020-12-30 21:22

    I had this issue after symlinking my project files to another partition on the hard disk. I fixed it by editing the path for each project from Project > Edit Project to the new location.

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