I have cygwin installed on my new Windows-10 PC and I have a file "foo.bash" on my desktop that I need to be able to double-click on and have c:\cygwin64\bin\bash.exec open it (foo.bash is a shell script being interpreted by bash.exe). On my previous PCs I simply double-clicked the program, browsed til I found/selected bash.exe, clicked the "always use this app" button and from then on double-clicking on foo.bash would always open it using bash.exe.
On my new Windows 10 laptop I initially had the same experience but then after a couple of days I created a file named "bar.bash" and was surprised to get prompted for what type of app to open it with. bash.exe was listed so I selected that, clicked the "always open with" again and that was fine but then when I had to open it again later I found that the "always open with" hadn't stuck. So I repeated and could not get Windows to remember to open that ".bash" extension file bar.bash with "bash.exe"
So I went back and double clicked on the original "foo.bash" and it opened with bash.exe. I tried changing it's "open with" to Notepad to see if that would stick and it didn't AND then I found I could no longer get bash.exe to stick either.
So now every time I double-click on a file with a ".bash" extension I have to click on bash.exe to open it. I have tried associating the extension with the app from the file properties, from the Settings menu, and everywhere else that any web page I can find tells me will work and none of them work - I 100% CANNOT get Windows 10 to remember to open ".bash" files with "bash.exe".
I also followed the steps at https://www.winhelponline.com/blog/remove-file-association-windows/ to delete the references to a ".bash" extension from the registry and that changed the popup prompt for which app to open the file with but after once again selecting bash.exe and "always open with", I was back once again to having to repeat the process every time I open the file.
Does anyone have any real ideas on how to do this? I assume it'll involve some arcane procedure to edit registry entries or something else that I REALLY don't want to be messing with but I've exhausted all of the "normal" ways that this should work from a user perspective.
Eureka! In a flash of inspiration I restarted Windows in Safe Mode (a chore in itself these days - see https://www.digitalcitizen.life/4-ways-boot-safe-mode-windows-10) and then right-clicked on foo.bash, searched for bash.exe again, selected it and now after rebooting back out of safe mode the association with "bash.exe" is still in place for all my ".bash" files.
So the trick is - go into safe mode to permanently associate the file suffix with the app.
My normal workflow is to have Sublime Test 3 re-open the last opened project files; this works great for me, normally. But when I'm not at work, my laptop does not have access to the NFS shares, and when the projects get opened, all of the opened files disappear; this happens most often when I just need to jot down a quick note or something.
Is there a way, without editing user pref files, to open up the editor without loading the current projects as a one-off occurrence? Command-line solutions are fine, and may even be preferable.
I really want a way to switch programming contexts quickly without hunting for windows that I've left strewn about. What would be nice is a command line tool to let me switch between different patches that I might be working on, and automatically open the sublime text workspace that I had open the last time I was working on that patch. The issue is that in order for the tool to know about the workspaces associated with said patches, it either needs to be told about them explicitly, or it needs to be able to tell sublime to save the current workspace with a specific file path.
Sublime does have a save_workspace_as command, but it opens a saveAs dialog, which is not what I want, and I can't seem to find any documentation that suggests that save_workspace_as can take an argument.
Any ideas?
I didnt change any file paths and everything was working fine. I made one quick change saved it ok, did another change and I went to save it and got the following error. How can I solve this. It will save other files ok
Unable to save
D:\xampp\htdocs\websites\dev.liverpool\style\main.scss
Error:
MoveFileEx(D:\xampp\htdocs\websites\dev.liverpool\style\.sublae1.tmp, D:\xampp\htdocs\websites\dev.liverpoolzstylezmain.scss) failed,
Access is denied.
seems it's because Windows or another program is blocking the file. Sublime text uses a temporal file instead of editing the file directly, and when you save the file uses a API command to move this edited file to the original, so this command has restrictions when one file is locked and Sublime shows this alert.
Maybe this setting {"atomic_save": false} will work for you.
Go to the path where you installed sublime text 2 and...
Right click on the sublime_text 2.exe file.
Go to its properties.
Go to compatibility section under this.
Set its privilege level to "Run this program as an administrator".
Now change settings for all users and there also check the field "Run this program as an administrator".
Apply the changes.
I just solved the same issue on Sublime Text 3 beta, Stable Channel Build 3065 by doing the following under Windows 7:
Navigate to the Sublime Text 3 executable file, wherever you have it installed.
Right-click it and select properties.
Click on the tab marked "Security"
About half way down the tab, on the right hand side, under the list of group and user names is this little button:
Click it.
If your machine is setup the way I suspect it is (otherwise you probably would not be having this issue), you should be prompted for your administrator account credentials. Enter them.
Now, select the Users group in the list, then take a look in the box at the bottom labeled 'Permissions for Users'. Put a check mark in the 'Allow' column for the 'Write' item.
Click 'Apply'
Click 'OK'
You should be set. What this does is it essentially gives Sublime the ability to write files while running with regular user privileges, no administrator level access required. Upon taking a better look at your error, what is happening is Sublime Text is creating a temp file for editing, rather than editing to file itself, then attempting to overwrite the original file with the temp on save. The problem is that the program is not being run by a user with sufficient privileges to perform the overwrite, hence the failure with an 'Access denied' message.
A simple and effective solution: Right-click on the file you want to save, in my case it is index.html, go to the properties and uncheck read-only.
The Sublime text will start working fine.
I have come across this error quite many times and by un-checking read-only file attribute of index.html, I am able to get rid of it
I found out more ways to fix this:
Close and reopen the Sublime Text windows or
Open the file with Np++, add a space, save, quit, then you're prompted by ST to reload the file, click yes, and it works again... or
Open the FTP console to see if there's a transaction in progress - then cancel it
In my case the SFTP plugin seems to be causing this problem, as when the FTP connection is timed out, the file which is waiting to be uploaded is being used, and you try to overwrite it.
This happens because you're using ScoutApp or Compass, they block your SCSS files because they are checking for changes as you specified for a directory for those files.
I suggest you reading this:
http://aspirecode.com/how-to-add-sass-support-in-sublime-text/
Good luck!
On mac using a remote volume sometimes I experience this. The solution is to remove the temp file then save again and all fixed.
IE: if you are working on test.html then the temp file would be ._test.html
Remove ._test.html then save again.
For Mac-
Try changing the destination from 'Macintosh HD' to 'Documents' or any other folder.
Worked for me.
The plugin of Superlime solved this problem. It tries to save the file as root in SublimeText.
Reference Link: https://github.com/azubr/Superlime
Try switching your SublimeText process priority to higher level in process manager (it has to have higher priority than your scss compiling app, if you're using one).
It seems to have worked for me.
if it's not working after doing all suggestions, reinstall the program
On Mac I saved the file in Home directory and it gave me this alert, later when I re saved the file again this time in Document directory the file is working now. Using SublimeText 3.
I found this occurred when the folders are read-only. Right-click on the folders where your site is contained and see if read-only is selected in the properties.
Just open it as an administrator.
Because I want to edit anything and write as admin all the time, I set this program to always open as an administrator using "Configure Applications to Always Run as an Administrator".
Just got your file folder properties which you want to save and deselect to read only attribute.
I downloaded and modified a style file and placed it in the Notepad++ themes folder. I was able to select it and have it update the style as expected. I then went to Settings -> Style Configurator and changed the font of COMMENT of language VHDL to MS Gothic, hit save, and closed and exited Notepad++. I am able to relaunch Notepad++ and still see the change (I'm running Notepad++ in admin mode on Win7).
The only file that I can see a new timestamp on is my XML theme file, but I don't see MS Gothic anywhere in the file. Where is this information being stored? It is overriding the settings from my theme file. I also checked %APPDATA%\Notepad++\stylers.xml but I don't see it there either.
I realize I can change it back through the GUI, but I'd like to know how to get back to my original theme without selecting every style in the language manually (as I've made multiple changes). If I could edit (or delete) a file, I would prefer it.
Look in your %APPDATA%\Notepad++ folder, specifically for the stylers.xml file.
Uninstall Notepad++
Reinstall it again, but this time check the first box, the one that says "Don't use %APPDATA%..... "
Enjoy.
The reason is that Notepad++ install all the files at administrator profile, if you are using another user then you are screw, it will not work properly, you have to run it always as an administrator so it can work properly. To avoid this, just do as i said.
If files are going to APPDATA, then you can create a folder called "themes" and then inside that place your new xml themes. Then close and reopen notepad++ and you should see your new style in the "Select theme:" drop down. Whatever you named the file should be what appears in the dropdown
If you are on Windows 10 the path to add the new theme is :
C:\Users\NAME-OF-COMPUTER\AppData\Roaming\Notepad++\themes
stylers.xml is located one director/ folder above the themes :
Just as a complement to the other answers, if you made the changes on another theme than the default theme (stylers.xml) then your changes are saved to
%APPDATA%\Notepad++\themes\TheThemeYouModified.xml.
For example, if you modified the choco theme, then look for the %APPDATA%\Notepad++\themes\choco.xml.
You will also find a choco.xml in the C:\Program Files (x86)\Notepad++\themes but this one is not where your changes are saved.
I tried Rbastardo answer, but even when I check "Don't use %APPDATA%....." when installing Notepad++, the changes are still saved in %APPDATA%.
In case this helps someone in the future, if you installed Notepad++ via Scoop then look for your themes directory here:
D:\Users\yourusername\scoop\persist\notepadplusplus\themes