DEV Community

Cover image for Fix VS Code Explorer for Content Projects
chantastic
chantastic

Posted on • Originally published at chan.dev

4 1

Fix VS Code Explorer for Content Projects

The VS Code explorer displays folders at the top of a directory.
This is a common hierarchy that I like in most cases.

But I hate it for content.

For content sites — like chan.dev — I prefer alphabetical order.
I want to see my files and folders all mixed up together.

Screenshot of the Visual Studio Code Explorer, showing several markdown posts. With  raw `explorer.sortOrder: mixed` endraw , a directory of the same name as a post appears next to a post with the same name.

How to change the setting

To change the default behavior, open Settings and find the option for Explorer: Sort Order.

Screenshot of VS Code Settings, for the option Explorer: Sort Order. Selected is the  raw `mixed` endraw  option.

With this option enabled, files and folders are interwoven in the explorer.

Why I prefer mixed sort order

On chan.dev, I have lots of markdown files.
Some of them have images.
And I want to keep those images in a folder nearby.
I ain't tryna faff with Cloudinary or hunt down shared /assets/images folder.
I want them right next to my post.

This makes it easy to keep my place on the file system.

Take it further with workspaces

As mentioned, I prefer the default sort order for most projects.
So, I keep this setting stored in my chan.dev workspace.
And only this project is impacted by the setting.

// chan.dev/.vscode/settings.json
{
  "explorer.sortOrder": "mixed"
}
Enter fullscreen mode Exit fullscreen mode

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (2)

Collapse
 
pottoku profile image
Jason Aloyan

Great job

Collapse
 
chantastic profile image
chantastic

Thanks, Jason!

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay