Live data from Hacker News

Sublime text started adding a “.s” to new files

forum.sublimetext.com

91–100 of 138 posts

Re: Sublime text started adding a “.s” to new files

#91
post #7

My guess, having never used OSX: 1. In the save dialog, filetype can determined in multiple ways (maybe selected from a dropdown, or be set by the program opening the dialog) and not necessarily just inferred from user-entered filename 2. So when returning the path to the program, it appends the filetype's extension to the path iff it doesn't already end in it (so user can enter just `notes` and file gets saved as `n…

I iTunes had a very similar "autocomplete tries to be helpful but causes chaos" bug a few years back. If you clicked to edit the artist column it would autocomplete from the list of other artists in your library. However, if your desired artist name was shorter than one it's trying to autocomplete, it would forcibly append the rest of the name from the longer artist. e.g. if you typed "Ross" and wanted it to just be…

I remember this, how annoying! I think you'd work around it by pasting.

Re: Sublime text started adding a “.s” to new files

#92
post #13

I don't understand. What adding ".s" to the file name is supposed to correct?

It's some sort of bug around saving "non-standard" extensions. And it seems to grab as many of the original characters as it can that match a known extension, so `test.foo` becomes `test.foo.f`, `test.solo` becomes `test.solo.s`, but `test.executive` becomes `test.executive.exe`, and `test.asm` becomes `test.as` And it affects their code that they run to validate when you change an extension. Normally if you open a f…

But this isn't DOS with a hardcoded 8.3 filename. You can have any number of dots in a filename on a Unix-style OS, and there's nothing special about whatever follows the final one.

What you think of as file extensions are merely a matter of convention. Some applications may treat them more seriously, but that should be up to the app to enforce - not the OS.

I can see no reason why a system-wide file dialog should ever be altering this.

Re: Sublime text started adding a “.s” to new files

#93

Earlier quoted context omitted.

To answer your questions, no, they do not use an editor that isn't Xcode. And I would also suspect none of them use desktop macs daily and instead use macbooks.

But surely they must tether their MacBooks to external displays and desktop Mouse’s and Keyboards! I didn’t think they’d be using Mac minis, Studios or Pros as such. They can’t all be using the little mini Magic Keyboard or working directly on their laptops? Can they…. :-O

Not a developer at Apple, but I've been using Magic Keyboard's (without numpad) for about ten years now exactly because it has the same layout as every Macbook I own(ed). If they were to ever make a numpad version with the fn key at the same place I probably wouldn't switch either because I would just be trying to hit the numpad when I'm on the laptop's keyboard.

Re: Sublime text started adding a “.s” to new files

#94
post #47

Title here should be "Sublime text started adding a “.s” to new files. Very annoying".

Strangely, it’s not doing this to me, at all, with the non-beta Sequoia and using Nova. I’ve been happily coding away without that happening. Not saying this isn’t happening for other people, of course! But it must be some odd interaction between Sublime or Zed and Sequoia, not a new intentional feature affecting everyone or every editor.

> must be some odd interaction between Sublime or Zed and Sequoia

The same happens with MacsOS' own TextEdit. All "unknown" file suffixes are a problem

Re: Sublime text started adding a “.s” to new files

#95

In the Save File As dialog of most Windows apps, you can enclose the filename in double-quotes to force it to not add an extension. I wonder if that will help with the issue in macOS?

No, macOS will just put quotes in the name. I just saved file from vscode as "testfile.sql", including the quotes, and wound up with a file named "testfile.sql".s.

Wow. Coming from DOS times, supporting double quotes in a filename is wild. I _still_ tend not to use whitespaces in filenames!

Re: Sublime text started adding a “.s” to new files

#96
post #52

Earlier quoted context omitted.

What Debian has nailed in the last 10 years is the package management situation that is so smooth. This is why I’m leaving Arch, everything breaks sometimes or a dep won’t upgrade for this or that reason. Debian you install and the package probably has a pretty good initial config and works. Any packages that aren’t recent enough can be built usually because the toolchain versions are probably recent enough. So it re…

Aren’t Debian and Arch philosophic opposites though? Arch is bleeding edge yet permanently issue prone, Debian is stable and conservative/slow in updating? Seems odd to jump from one end of the spectrum to another (I use Debian and Mint mostly but have respect for the Arch project’s aims)

> Debian is stable and conservative/slow in updating?

Sid isn't.

Re: Sublime text started adding a “.s” to new files

#97
post #83

Earlier quoted context omitted.

2FA support. Gmail requires 2FA.

It doesn't "require" it. Users might enable it or disable it. If it's disabled, can you explain to me how is it safer?

Gmail can require 2FA more or less at google's whim, regardless of user preferences (and if you don't have a method set up, you'll be locked out of logging in, at least through that particular device/connection)

Re: Sublime text started adding a “.s” to new files

#98
post #46

Earlier quoted context omitted.

Isn’t this almost certainly a bug? I’m pretty sure the MacOS developers don’t really want to add a .s extension to files.

I can understand people thinking it’s a misguided feature considering my own experiences.

A feature to accomplish... what?

It isn't "autocomplete" as the original title implied; the .s never appears in the save dialog even if you tab away from text entry.

Apple has been deprecating global access to the universal type system, so it is certainly possible this was an edge case falling out from that.

Re: Sublime text started adding a “.s” to new files

#99
post #13

I don't understand. What adding ".s" to the file name is supposed to correct?

It's some sort of bug around saving "non-standard" extensions. And it seems to grab as many of the original characters as it can that match a known extension, so `test.foo` becomes `test.foo.f`, `test.solo` becomes `test.solo.s`, but `test.executive` becomes `test.executive.exe`, and `test.asm` becomes `test.as` And it affects their code that they run to validate when you change an extension. Normally if you open a f…

Yes, and it specifically is more noticeable in applications that let you open any file type; if you open and save a list of specific types, you have described those types to the system (and so there is a registered full extension to use).

That said, I doubt it is something Sublime and others missed in terms of API - TextEdit has the same issue.

For comparison, Xcode actually does register every filetype it supports, so it would be difficult to hit this issue in the official IDE.

Re: Sublime text started adding a “.s” to new files

#100

Earlier quoted context omitted.

No, macOS will just put quotes in the name. I just saved file from vscode as "testfile.sql", including the quotes, and wound up with a file named "testfile.sql".s.

Wow. Coming from DOS times, supporting double quotes in a filename is wild. I _still_ tend not to use whitespaces in filenames!

pretty common on UNIXes; you can also have forward slashes in filenames. They just have to be escaped to differentiate.
Post reply on HN