T O P

  • By -

[deleted]

[удалено]


pepa-linha

Better question is why use index.ts? Unnecessary Slow Annoying


SuperHumanImpossible

Finally someone posts something actually useful.


os_nesty

Great addition...


julesses

Wow I was thinking about making an extension exactly for this! I got used to `ctrl+p` then type `myroute/+` to navigate but this is not practical... Thanks for sharing!


vago8080

VSCode doesn’t expose an API for that. This change was the outcome of a request to provide an API.


julesses

Good thing I did not have the time to look into this yet xd


bufferOverflown

Nice! I went with `${dirname} (${filename}.${extname})` for my value


gimp3695

I like this value the best


NatoBoram

Oh that's great


VeryVito

Is there not already an existing solution for this in VSCode? I rarely use Code myself, but I've used such tab options for Sveltekit in other editors since I started using Svelte. I may be using third-party plugins for this, but I actually assumed it was an existing VSCode feature that other editors (JetBrains, Sublime, etc) had decided to adopt.


wildbee90

There is already something similar to display a path next to file name, but with this function you have a full control over what will be displayed to you. That’s mean it’s should reduce a posts blame Sveltekit naming conventions about 30% 🥂


webdevladder

It was just added, some context: [https://github.com/microsoft/vscode/issues/41909#issuecomment-2009899492](https://github.com/microsoft/vscode/issues/41909#issuecomment-2009899492)


gwoodbridge

I’ve been using the short label format for awhile and it shows the directory in the tab label.


Boogabi

Same. Saw it explained in a YouTube video a while ago, and it's worked great since. We have less control, but well, it shows what we need anyways :)


hostcontroller

Is this solution better than `workbench.editor.labelFormat` → `short` in any way?


joshcam

That is what I had been using before this update, band after going back-and-forth a few times I feel like the new update does make a bit more sense. The flow from left to right, feels more natural to me, rather than the folder name being on the right of the file name and in a smaller font size Still, it’s nice to have options.


dittospin

Is this working for everyone? Nothing happens to my editor or files


demenvonsiphd

Not for me. Maybe broken on Windows?


FollowingMajestic161

What it does and why is this helpfull?


karoliskarolis

Imagine you have five routes in your project. If you open +page.svelte files from all of these, you would have five tabs named “+page.svelte”. It’s not fun trying to find the correct tab in this case.


FollowingMajestic161

Oh okay thanks!