DEV Community

Syed Ammar
Syed Ammar

Posted on

Show folder name instead of index.tsx in VS Code

If you're like me, you probably have a dozen tabs called index.ts or index.tsx opened in VS Code, looking like this:

Image description

While VS Code shows the folder name on the right when you have two tabs with the same name open, I always struggle to identify them... (yeah, I read left to right).

Today I learned that you can customize those labels in VS Code. So if you prefer to see the folder name first for index files, you can use the following setting:

Image description

  1. Search for workbench.editor custom labels patterns in VS Code settings
  2. Click Add Item
  3. Enter */**/index.{js,jsx,ts,tsx} in Item and ${dirname} (${filename}.${extname}) in Value
  4. Press OK Now your tabs should look like this:

Image description

So much easier to read!

(if you'd like to show something different or shorter, feel free to modify the Value to anything that suits you).

Happy Coding !!

Dynatrace image

Frictionless debugging for developers

Debugging in production doesn't have to be a nightmare.

Dynatrace reimagines the developer experience with runtime debugging, native OpenTelemetry support, and IDE integration allowing developers to stay in the flow and focus on building instead of fixing.

Learn more

Top comments (0)

👋 Kindness is contagious

Discover fresh viewpoints in this insightful post, supported by our vibrant DEV Community. Every developer’s experience matters—add your thoughts and help us grow together.

A simple “thank you” can uplift the author and spark new discussions—leave yours below!

On DEV, knowledge-sharing connects us and drives innovation. Found this useful? A quick note of appreciation makes a real impact.

Okay