sublime text 3 sidebar autoupdating not working - text-editor

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 (osx).
Right now, I have to manually go to Project -> Refresh Folders
My user preferences are probably not the issue as they are very basic:
{
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",
"font_size": 18,
"tab_size": 2,
"translate_tabs_to_spaces": true
}
If anyone could help that would be great as I have tried googling, searching for an answer to this but havent found anything that works.
Thanks in advance.

I recently began experiencing this issue and it turned out to be DropBox related. Once I removed DropBox and restarted my machine the folder refreshing began working as before. Also, DropBox was affecting several other apps, specifically SourceTree and Transmit as well as Sublime Text 3.

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.

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.

Open the console and see if there are any errors. It logs when there are changes to the filesystem.

I've had this problem when I used disks that where mounted with samba. My best guess is that this has something to do with the OS or filesystem not triggering the correct events for sublime to realize that there's new stuff in the folders.
I'm guessing that the disk on which the project you're working on belongs to a mounted disk, that might have a different filesystem. Try moving the project and see if that helps. If that is the case maybe you ought to see over which flags and stuff you're using when mounting the disk on which the project was originally stored.
How you would go about fixing that however I have no clue about since I don't have any experience with OSX.

This could be the result of an error with the plugin SidebarEnhancements, as was the case for me. Using package control I removed the plugin. I couldn't package install the plugin back as it would not show up on the list of available plugins. So instead I followed this github issue in the repo and got it cloned into the correct directory.
Another side note, in sublime I clicked "Sublime Text" -> "Preferences" -> "Browse Packages". to open up the correct location to clone the repo in finder. If you click on the folder icon in the top bar of the resulting finder window you can actually drag this into iTerm2 so that you are in the proper location before running the git clone command included below.
git clone https://github.com/titoBouzout/SideBarEnhancements.git "SideBarEnhancements"
cd "SideBarEnhancements"
Finally, quit ST3 and reopen worked for me. Hope this helps.

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):
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);
Rename SideBarEnhancements to something else and then back to its original name;
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.
Open %HOMEDRIVE%%HOMEPATH%\.bashrc, or in other words: User\.bashrc (create the file if you don't have it);
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"&
}
Change the path to your sublime_text.exe (last line of the function);
If Git Bash is opened, execute source ~/.bashrc and go to 6;
If Git Bash is not opened, open it and go to 6;
Execute touchme without any brackets;
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.

I had this problem after reinstalling Sublime Text 2 and symlinking.
A workaround I found was binding the refresh_folder_list command with cmd+s, since that's usually when we see the sidebar updating.
For this to work you'll need to install run_multiple_commands plugin.
Then you'll have to update your User Keymap telling it to refresh folder list every time you save. The syntax is fairly simple.
I also ran across Synced Side Bar after fixing the issue. I am not sure if this is a solution but sounds promising.
Hope this helps.

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.

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:
Create a blank file and observe if Finder refreshed.
echo "" > test.txt
If Finder didn't refresh, navigate to the parent folder in both Finder and terminal. Repeat step 1.
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
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.
I removed .DS_Store files from the folders with this issue.
Remove the Finder preferences file and restart Finder. As described here.
rm ~/Library/Preferences/com.apple.finder.plist ; killall Finder
Exit Dropbox
Thanks to #peresleguine for the suggestion of renaming the folder.

I had the same issue with folders and files not showing up. No matter what folders I added it wouldn't work, refreshing folders didn't work, if I restarted Sublime, I would then see the folders I added but none of it's contents. I ended up going to File -> Close Window and then File -> New Window, after that when I added folders to the new window, it started working again. Seems like it's a corruption in the project file somehow. Anyways hope this helps someone.
Mac OSX Mavericks
Sublime 3 Build 3059

If you're using OS X with python version higher than 2.7.1, try downgrading python to 2.7. This fixed multiple issues for me:
brew update
brew install pyenv
echo 'if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi' >> ~/.bashrc
source ~/.bashrc
pyenv install 2.7
pyenv global 2.7
# now restart ST3

One of the sub-folders of my project contained a symlink to the project itself, making a loop. As soon as I've removed it and re-opened the project, the problem went away. However, that symlink was necessary for my project to function, so I created a simple .sublime-project file:
{
"folders": [{
"path": "/",
"folder_exclude_patterns": ["symlink-or-one-of-its-parents"]
}]
}
The exclusion pattern made Sublime ignore the loop, and the sidebar went back to normal right away. Just note that folder_exclude_patterns accepts folder names, not paths. That means that it might exclude something you didn't want to exclude (i.e. if you write lib it'll exclude all lib folders in your project, regardless of where they are). Hope this helps somebody.

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.

A bit late to the conversation, but I resolved this by turning off DropBox's Finder integration. There is a known issue with Yosemite 10.10.x
https://www.dropbox.com/help/7144
Click on the dropbox icon in your tool bar, click the gear and then open preferences. Un-check Enable Finder integration. Then restart your computer.
Hope that helps.

I just fixed this issue and I think the reason is because I use dropbox to sync my ST3 settings.
Somedays before I restarted with 'reopen windows when logging back in', and found sublime opened earlier than dropbox finished its initialisation, which caused some settings couldn't load properly.
The result was when I used subl . to open project, I found the side bar not working properly. At the first beginning, I just closed ST3 windows and re-run subl, but it didn't work.
Finally I quitted ST3 (cmd+q), and made sure dropbox was properly loaded, then subl again. This time it worked.
Hope it helps.

Related

Cannot access files within launched crouton but can from within chroot?

I recently updated a chroot on an old Chromebook from Ubuntu bionic to focal. The chroot has encryption enabled.
I usually work with Git repositories and other files within the Chrome's Downloads folder and haven't had any issues with this previously.
Since the update though, I found I was unable to run things like git clone -- I get an error saying cannot create worktree dir: no such file found. I looked around and found people had similar problems but there's been no clear solution.
Then I decided to look inside one of the existing folders within Downloads and noticed a problem there...
I can open a repo within my Downloads folder on ChromeOS and see all files as I used to.
I can enter-chroot and run ls on the same folder and see all files as I used to there too.
But when I launch the chroot/crouton (I used xfce4), and try to ls the folder from within the terminal, or even look at the folder contents from a UI window, the contents of the repo look encrypted -- as in all the filenames have changed to strings of equal-length and apparently random characters.
It's almost as if encryption is working in reverse -- so my files are unencrypted outside the crouton, but as soon as I go into the xfce UI, they're encrypted and there's no decryption happening. But that's speculation on my part...
Any ideas as to what is going on here? And how I can continue to work within crouton?
It seems this is to do with the fact that Chrome OS encrypts files and that something had happened since I updated Crouton (rather than my updating Ubuntu from Bionic to Focal).
I realised this was a bigger issue when even command line tools like tar and git (which I'd installed) weren't working.
When I tried to unpack a download of Firefox with tar xjf I got an error saying "Required key not available". Some searching around that led me to issue #3261 on the Crouton Github repo.
The solution for me was:
Ensure /etc/pam.d/su-l was writable. (I did ls -l /etc/pam.d/su-l to check but ultimately used sudo...)
Edit the file /etc/pam.d/su-l. (I used sudo vi /etc/pam.d/su-l to ensure the file wasn't read-only in that instant, and because I had no other text editor options but vi available.)
Comment out the line session optional pam_keyinit.so force revoke. (So it should read # session optional pam_keyinit.so force revoke.
Save the file.
Restart the chroot.

Can someone help me figure out why terminal (MacOS) will no longer find python files I have saved?

So I'm new to learning python. I have python 3.8.2 installed on my MacBook Pro. It was working fine for a week, and I was creating code in atom, saving as .py files to a folder on my desktop. Terminal was locating and running those files easy. However, now when I go into terminal it does not see that any of my files are in the folder, just a hello.py which prints "Hello World" but I do not have any such file in that folder.
For more background, I believe the source of the error is from my earlier command. I was unsure of how to quickly navigate terminal, and as I was in a folder in a folder and wanted to leave the second folder, I thought it was similar to those old command games were you tell them to do something. So in my dumb head I typed "MacBook-Pro:FolderName user$ exit foldername" then clicked return. After this I got a message that I didn't save so I don't remember it but it was a few more lines and I believe it said it exited. I could no longer type in terminal. I closed the shell and opened a new one and thats what lead to my current issue and why I am here seeking help.
I have included a photo of my atom code, what terminal says now and my folder of files terminal can't find.
Edit: I cannot include pictures yet due to reputation being low so it has been changed to a link photo of issue here
EDIT: To add to this, I created a new save folder, moved one of the old files over to the new folder, and it ran normally. This leads me to believe that I used terminal to somehow ignore or forget that initial save folder and all its content. Is that a thing that can happen?
Based on your picture, it looks like the misconception is about how directories work in MacOS. In your terminal, you type cd ~/py4e; in Unix systems, ~ is your home directory, so you’re navigating to the py4e subdirectory under your home directory.
Then, however, you type cd ~/ex_04 (or something), which means you’re trying to navigate to the ex_04 subdirectory under your home directory. This isn’t what you want; you want to navigate to ex_04 under the py4e directory.
In the Terminal, when you’re working in a current folder, you can change to another folder within that current directory by just typing the name of that subdirectory, i.e. cd ex_04 once you have run cd ~/py4e.
If you’re just starting out with the command line in MacOS, I would definitely recommend looking up some beginner tutorials online so you can get a better feel of navigating and working in the Terminal.

Gradle Error: Path is not a readable directory for an Android Project saved in OneDrive

I tried to use a OneDrive folder to store my Flutter project [Windows 10, Android Studio]. I then made edits to it on another machine [same configurations]. The project compiled fine on the first machine initially and on the second one after the changes. Running it on the first machine again after the changes I get the below error:
Execution failed for task ':app:processDebugResources'.
Path "build/[package]/intermediaries/compiled_local_resources" is not a readable directory.
I've tried a number of solutions mentioned in similar, though not equivalent issues:
Updating Android Studio
Running Android Studio as Administrator
Removing the [package] from my dependencies (this resulted in a
different package being identified in the error message).
Pressing File -> Invalidate Caches / Restart...
Commenting out
"org.gradle.jvmargs=-Xmx1536M" in gradle.properties
Doing:
cd android
gradlew clean
None of this worked.
I had the same problem today:
Path "build/[package]/intermediaries/compiled_local_resources/debug/out" is not a readable directory.
I was able to fix this issue by deleting the .gradle and rebuilding the project.
All I did was create the (empty) directory that it was looking for and it built fine afterward.
mkdir -p compiled_local_resources/debug/out
I had the same issue, came out of no where and it really shouldn't make the build fail... but all I did was create the (empty) directory that it was looking for and it built fine afterwards.
In the end the only thing that worked for me was pushing the project up to a Git remote and cloning it from there into another (local) directory.
[not sure this counts as a solution but nothing else worked for me after a long agonising search so hopefully it helps someone]
I know the OP had Windows, but if it helps anyone else in the future:
On Mac OS I discovered (the hard way) that Android Studio and Flutter do not play nice with being stored in iCloud! I noticed that some files weren't available locally and that's what was causing the problem for me. I moved my project out of iCloud (forcing it to download the missing files forever) and then it was fine.
Deleting the android/.gradle folder worked for me.
+1 also to the #1 answer (Vadow). As I do not have 50 points yet was not able to add this as a comment, so will have to post separately.
Like the OP, I have two machines - and got into trouble (Synology Drive). Vadow's solution worked for me, but I also had to do:
Flutter Clean
Flutter Pub Get
on the terminal and from within the project directory to get things follow back up and running.
Thank you Stackoverflow, and thank you Vadow!

How to delete a Component from Visual studio terminal?

I created Reactjs project and In a hurry I created a folder and named it as Background. In Background folder I have two files, first file name it Background.js and second file name is Background.css. Now the problem is I am not going to use that Component so I am trying to delete it. I tried to delete it but it is showing, The window is no longer responding
You can reopen or close the window or keep waiting.
My laptop configuration is very less I think that's why it is showing like this. So anyone please tell me how to delete Background folder along with Background.js and Background.css files from visual studion terminal. It will help me a lot thank you, If I am not clear with my doubt please put a comment.
If I am trying to delete Background folder it is showing like this
The window is no longer responding
You can reopen or close the window or keep waiting.
it actually depends on your operating system. with *Nix (Linux, Unix) based OS you can use:
cd ~/path/to/your/folder
# to delete any files with the name starting with Background:
rm ./path/to/files/Background.*
# to delete the whole folder:
rm -rf ./path/to/folder
on windows:
# to delete the whole folder:
rmdir /s <complete path of folder suppose>
# to delete the files:
cd <to your folder>
del Background*

I cannot Uninstall Tcl from my linux system

I installed tcl to learn it, however, I installed all the files in the wrong location. I am trying to uninstall it, But the uninstall file does not work. I am trying to carry out the instructions form their website:
To uninstall ActiveTcl, run the "uninstall.tcl" script that is located in the directory where you extracted the ActiveTcl archive. Note that you must use the "wish" in the distribution you wish to uninstall. For example:
% /path/Tcl/bin/wish /path/Tcl/lib/ppm/log/ActiveTcl/uninstall_ActiveTcl.tcl
stored, by default, in the directory /lib/ppm/log/ActiveTcl. You must use the wish interpreter from the distribution you wish to uninstall. Ensure that you do not run the uninstall script from a directory that will be removed during the uninstallation.
For example:
% /path/Tcl/bin/wish /path/Tcl/lib/ppm/log/ActiveTcl/uninstall_ActiveTcl.tcl
Note: if you are uninstalling both ActiveTcl and Tcl Dev Kit, uninstall Tcl Dev Kit before uninstalling ActiveTcl.
There is no uninstall_ActiveTcl.tcl. I do see an "uninstall" file but it does not have an extension, and I do not know how to run it.
Any help is appreciated
Thank you
Try editing the file to a uninstall.tcl file and see if that works. Take a back-up first though. Because we might need that file later
I re-installed it in a new location, compared the files that were installed between the old and the new location and deleted the file sin the old location. Unfortunately I could not delete many of the hidden files, as I did not know if they were there originally or if they belonged to Tcl. I am really surprised and disappointed there is no easy way to uninstall tcl properly.
I strongly suspect that you should uninstall ActiveTcl as follows:
Open a command prompt
Change directory to where you found the install file - e.g.
$ cd path_to_Tcl_installation/bin
Run the file
$ ./uninstall
On linux systems, you don't need any particular file extension in order to be able to run a file.
I don't know CentOS but a little googling led me to a forum thread that describes how to open a command prompt.
Good luck

Resources