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