Live data from Hacker News

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

forum.sublimetext.com

131–138 of 138 posts

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

#131
post #13

Earlier quoted context omitted.

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 ev…

I think this is a combination of a bug interacting with two different things. One is the extension change checker, and the other is the system that adds extensions invisibly in order that the OS can still pretend 23 years later that extensions don't matter. Because while you're right about the fact that extensions shouldn't matter, you're wrong about the fact that they do. Because unlike classic mac os, we don't have file types encoded in the metadata of the file anymore. The only way for an application to specify the types of files it can or can't handle is the extension. And likewise for telling the OS which applications should open a given file type by default. The extension does matter, because it's important metadata the OS and applications use to determine how to handle the file. macOS tries to hide this importance by default and won't show extensions if you don't want it to. But in order for that to work and for files to still be the right type so other apps can know what to do with them, the OS save dialog MUST put a proper extension on the file, even if you don't display it. But now because that's something that can (and will) be changed in the save dialog, it also has to check if you're applying a new extension to a file that already has an extension. Because it needs to confirm if you meant to change the extension or just (as you point out is possible) add another dot separation to the file name. So there's probably a bug in the part that's supposed to be checking for whether it needs to add the extension. Some default case path got broken, and it's taking the case where you save, but include an extension as being saved without an extension because it didn't recognize the extension from its list of "proper" extensions.

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

#132

Earlier quoted context omitted.

Really? I have had package manager failing experiences since I installed Arch. About 1-3 times per month yay will fail requiring me to use pacman to update. Once I run pacman I can run yay to update my AUR deps when the selling point of yay is that it’s a completely pacman-compatible interface. It’s package situation is so fuzzy though that the community actively encourages you to install multiple package managers. T…

To a great extent, the experience of using Arch is the experience of reading the Wiki and doing what it says. I say this without any judgement implied: if you don’t want to read the Wiki, Arch is not for you. Debian is an excellent distribution. Personably I started using Arch because of its excellent Wiki, after three Fedora updates in a row failed on me and I found myself over and over in the Arch Wiki getting answ…

Yeah Arch is fine if you don’t mind stopping to search for an answer. Most times it’s in the wiki, a lot of times it’s a library upgrade that just causes the pm to fail. Fine if you know what to bang on but I got tired of having to bang.

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

#133

Earlier quoted context omitted.

It's just a bug. The system save panel (NSSavePanel) is only supposed to infer the file extension when it has been given a list of supported file types/extensions. If the user does not specify a file extension, NSSavePanel will use the first extension in the supported list. If the user specifies an unsupported extension, they see an error message. Text editors like VSCode and Sublime Text would configure NSSavePanel…

> It's just a bug. It's an unforgivable bug. File save dialogs have been around for decades. There's no reason whatsoever to not have very extensive unit and integration tests around it.

Sure there is, 3 reasons:

1) No one writes unit tests for old code until it breaks the first time, because they're too busy working on new stuff.

2) No one gets assigned to write unit tests for old code until it breaks the first time, because there's always more work to do than you have time to do it in and if its not broken, its not hurting anyone enough to get resources and time diverted to it

3) Even if you write a mess of unit tests for stuff, it's always possible to miss unit testing a specific scenario. 100% line and branch coverage is not 100% bad outcomes or 100% possible inputs.

I've never worked anywhere that had 100% of their code tested with automated tests around 100% of the possible inputs and outputs. And the older the code and the longer it had been running stably, the less likely it was to have that testing if the testing wasn't written with the code. Like everything else in development, tests add up in the technical debt pile too.

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

#134

Earlier quoted context omitted.

Are you sure you can't remap the keyboard shortcuts? I believe you can change them in System Settings -> Keyboard -> Keyboard Shortcuts

AFAICT You are able to remap the 'Globe' key to another key, say CAPSLOCK. But you can't remap the key combinations assigned to the new Tiling feature!

You can enter new keyboard shortcuts to replace the existing ones in Preferences -> Keyboard -> Keyboard Shortcuts -> App Shortcuts -> All Apps (or just the specific ones if you only want it in certain apps). Just be sure to use the full menu item path. So your menu item should be `Window->Move & Resize->(Left|Right|Top|Bottom|etc)`. I had to close out of the shortcuts dialog and switch to another app for it to take, but it works.

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

#135

Earlier quoted context omitted.

AFAICT You are able to remap the 'Globe' key to another key, say CAPSLOCK. But you can't remap the key combinations assigned to the new Tiling feature!

I think they’re on the windows menu. If so, I believe you can. I’m staying away from Sequoia for awhile though, so I can’t test it.

How about that, so they are!

I didn't think to look there LOL

Thanks for the heads up, you've made my day!

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

#136

Earlier quoted context omitted.

> Intel Mac OS X 10_15_7. This is on an M4 MacBook Pro running 15.0. So not correct.

Heya, I couldn’t find a way to contact you privately but I’d assume you want to delete your comment until (presumably) next month! Correct me if I’m wrong tho :) Alternatively, a mod could help to edit it instead

Why would they want to do that?

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

#137

Earlier quoted context omitted.

I think they’re on the windows menu. If so, I believe you can. I’m staying away from Sequoia for awhile though, so I can’t test it.

How about that, so they are! I didn't think to look there LOL Thanks for the heads up, you've made my day!

:)

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

#138

Earlier quoted context omitted.

Heya, I couldn’t find a way to contact you privately but I’d assume you want to delete your comment until (presumably) next month! Correct me if I’m wrong tho :) Alternatively, a mod could help to edit it instead

Why would they want to do that?

To be honest, I’m not entirely sure.

It’s a product that isn’t officially announced yet. Anyone could mention that they own that device of course, but it’s the extra credibility of him being an ex-Apple SWE (judging from his comments) that convinced me to drop that comment.

Dunno if there could be any legal implications, if not - all good!

Post reply on HN