Sublime Forum

Sublime text started adding a ".s" to new files. Very annoying

#1

3 Likes

#2

Does that happen in Safe Mode?

0 Likes

#3

Maybe check, whether "default_extension" setting. If specified all new files would use its value as file extension.

0 Likes

#4

@OdatNurd I just tried SafeMode. Still happens.

0 Likes

#5

@deathaxe I tried that, didnā€™t do anything.

So if I create a file called ā€œaā€, it saves as ā€œaā€ normally. If I create a file called ā€œa.scrollā€ it saves as ā€œa.scroll.sā€

0 Likes

#6

Going off https://github.com/zed-industries/zed/issues/16969 itā€™s a ā€œfeatureā€ Apple added that auto-corrects file extensions. Since this is a native dialog and affects all applications I donā€™t think thereā€™s anything we can do here.

5 Likes

#7

Wow. Crazy. Thanks @bschaaf for looking into this! Iā€™ll try to escalate to Apple and get this fixed fast.

2 Likes

#8

Landed here via https://news.ycombinator.com/item?id=41618926

Just to add, Iā€™m seeing the exact same thing but had not gotten around to submitting any bug reports.

But itā€™s reproducible in ST and VSC.

If I create a new file called ā€˜foo.html.hamlā€™, the system will append .h to the file!

Why on earth would Apple add a ā€˜featureā€™ like this!

3 Likes

#9

Can confirm I can reliably reproduce this on macOS 15.0 (24A335) with Sublime Text 4180.

Repro steps:

  1. Make new file (cmd+n)
  2. Save file (cmd+s)
  3. Enter filename e.g. bar.foo

Expected: to have a file named bar.foo saved
Actual result: I have a file named bar.foo.f saved :upside_down_face:

It appears that the save dialog is taking the first character of the word after the period and using that as an ā€œautomaticā€ extension for non-registered filetypes. i.e. .foo -> .f

This does not happen with ā€œknownā€ filetypes such as .c, .cpp, etc.

I donā€™t work with .scroll files but I was also able to repro following the same process as OPs video.

This is with all autocorrect, etc. settings disabled fwiw.

The same behaviour also happens with Visual Studio Code and with macOS TextEdit :grin:

As seen in the screenshot below this is using TextEdit to save a file called bar.foo. As the bar.foo.f file saved by Sublime Text is already present it is asking me to replace it and as you can see it has added the .f extension itself so I think it is safe to say this is not a Sublime Text bug but a macOS one.

1 Like

#10

For me it seems that macos is more like trying to find a known file ending that fits the best, instead of just taking the first character.

For example test.txtx is changed to test.txtx.txt

1 Like

#11

I have the similar problem saving .md (markdown files). I try to save README.md and it saves as README.md.m and text isnā€™t highlighed as usually in Markdown
Iā€™m on Mac Sequoia 15.0

1 Like

#12

Iā€™m sure Apple is aware of this, but I have filed my own report (https://feedbackassistant.apple.com/feedback/15301291), it doesnt seem like they have public bug reporting, but putting that link for my own future reference to keep an eye on this. If they update my issue, Iā€™ll report back here.

1 Like

#13

bug report via feedback app, now says ā€˜Potential fix identified - For a future OS updateā€™

1 Like

After upgrading to macOs15, sublime text has performance problems