sublime text 3 sidebar autoupdating not working

前端 未结 16 1642
失恋的感觉
失恋的感觉 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: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.

提交回复
热议问题