Sublime Forum

Unable to save my files and package question

#1

So far I’m really loving Sublime Text. However, a couple of things prevents me from using it as my daily editor:

  1. Sometimes I can’t save files! That’s a pretty bad “feature” in a text editor o.O Sublime Text makes the case that my file is locked by another process, but it most certainly is not.

  2. I have problems adding syntax for a new language. I’ve based it on the C language file, but at this point I really need documentation for each and every tmlanguage feature (the language at hand is way more complex than C, but based on it). Is a comprehensive list available anywhere?

Thanks,

wilby

0 Likes

#2

Hi and welcome,wilby.

Two suggestions:

  • split your requests into different threads.
    That help to not mess-up the discussion about the different questions and help others to find an answer if they have the same question.

  • mention your environment, OS and version, Sublime Text version, …
    and steps you have done to get such behavior and what the exact messages were.
    (on Win32 you can press Ctrl+C to copy the message and post them here)

0 Likes

#3

[quote=“Jim”]Hi and welcome,wilby.

Two suggestions:

  • split your requests into different threads.
    That help to not mess-up the discussion about the different questions and help others to find an answer if they have the same question.
    [/quote]

Alright, I will do that the next time around!

Sublime 3, latest beta running on Windows 8.1 64 bit.

The message is

Unable to save C:\home\wilby\projects\ta\core\CycleDetector.cpp
Error: The process cannot access the file because it is being used by another process.

0 Likes

#4

You mean really beta? Build 3059, Release Date: 17 December 2013
Not dev, Build 3062, Release Date: 5 May 2014

[quote]The message is
Unable to save C:\home\wilby\projects\ta\core\CycleDetector.cpp
Error: The process cannot access the file because it is being used by another process.[/quote]

Only with this particular file?
Only in that folder?

That seams not to be a SublimeText or OS accessing problem.
More likely what it says: somewhat blocks your file. Compiler? Versioning system? (anti-virus app???)

For Win32 utilize Sysinternals ProcessExplorer or such apps to get a glue who is locking your file.

some quick googeling:

howtogeek.com/school/sysinte … sson3/all/

open process explorer press ctrl+f or go to find menu and click file handle or dll and
write the file name which is app.log then click search it shall show you the file which is locking the log file.
social.technet.microsoft.com/For … e-log-file

Microsoft/SysInternals Process Explorer - Go to Find > Find Handle or DLL.
In the “Handle or DLL substring:” text box, type the path to the file (e.g. “C:\path\to\file.txt”) and click “Search”.
All processes which have an open handle to that file should be listed.
superuser.com/questions/117902/e … in-windows

0 Likes

#5

Ah yes, I meant latest dev release (3062). I have had this problem for a while though.

[quote=“Jim”]Only with this particular file?
Only in that folder?
[/quote]

Any file in any folder.

I did. No other process is locking the file.

I did some searching and found a setting called atomic_save which was “true” on my system (maybe a plugin turned it on? I’m pretty sure I didn’t.) When I set this to false, I no longer get the error.

0 Likes

#6

This is a known bug that hit me as well: github.com/SublimeText/Issues/issues/379

Unfortunately, this is an issue tracker that is not currently tracked by the Sublime Text developer (but may be at a later point IIRC)

I would encourage you to shoot a mail to sublimetext hq - a lot of people are having this issue so it doesn’t hurt that they get some mails regarding the issue.

0 Likes

#7

I am getting the same error.

When I have “atomic_save = false” I get this error. “Unable to save (my file here). Error: The process cannot access the file because it is being used by another process.”

When I have “atomic_save = true” I get this error. “Unable to save (my file here). Error: MoveFileEx(my file’s directory.subldf1.tmp, my file) failed. Access is denied.”

I have used process explorer to find my file and it finds nothing. While this file locking is occurring, I am able to open up the file in Visual Studio and/or TextPad and save it just fine. It’s a bummer because I enjoy using Sublime, and I would rather use it than VS or TextPad. I am also using Sublime in administrator mode, afaik.

Questions:

Should I set atomic_save to true of false in general?
What else should I try to resolve this issue?

I am using ST3, Build 3065, on a Windows 8.1 OS 64-bit.

Thanks for any help.

0 Likes

#8

[quote=“mule52”]I am getting the same error.

When I have “atomic_save = false” I get this error. “Unable to save (my file here). Error: The process cannot access the file because it is being used by another process.”

When I have “atomic_save = true” I get this error. “Unable to save (my file here). Error: MoveFileEx(my file’s directory.subldf1.tmp, my file) failed. Access is denied.”

I have used process explorer to find my file and it finds nothing. While this file locking is occurring, I am able to open up the file in Visual Studio and/or TextPad and save it just fine. It’s a bummer because I enjoy using Sublime, and I would rather use it than VS or TextPad. I am also using Sublime in administrator mode, afaik.

Questions:

Should I set atomic_save to true of false in general?
What else should I try to resolve this issue?

I am using ST3, Build 3065, on a Windows 8.1 OS 64-bit.

Thanks for any help.[/quote]

Sounds like you should try build 3074 or newer. sublimetext.com/3dev

0 Likes