{"id":5444,"date":"2026-09-26T08:38:13","date_gmt":"2026-09-26T08:38:13","guid":{"rendered":"https:\/\/geekmungus.co.uk\/?p=5444"},"modified":"2026-09-26T08:38:13","modified_gmt":"2026-09-26T08:38:13","slug":"stop-vscode-compacting-single-sub-folders","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=5444","title":{"rendered":"Stop VSCode Compacting Single Sub-Folders"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">So you have a folder and within that folder you have a single subfolder (and no other files) at that level, but then some files inside the subfolder. VScode by default will compact path in the GUI.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example I have a folder structure like this:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">~\\projects\\ansible-lab\\<br>~\\projects\\ansible-lab\\hosts<br>~\\projects\\ansible-lab\\plays<br>~\\projects\\ansible-lab\\roles<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The projects folder only contains one folder &#8220;ansible-lab&#8221; and so it renders it like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"182\" height=\"103\" src=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2026\/09\/image-4.png\" alt=\"\" class=\"wp-image-5445\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To stop this behaviour (if you so wish), you search for &#8220;compact folders&#8221; within Settings, and then untick the box.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"162\" src=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2026\/09\/image-5-1024x162.png\" alt=\"\" class=\"wp-image-5446\" srcset=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2026\/09\/image-5-1024x162.png 1024w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2026\/09\/image-5-300x47.png 300w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2026\/09\/image-5-765x121.png 765w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2026\/09\/image-5.png 1378w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The UI will then render the folder structure like this instead, which can be clearer in certain situations.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"163\" height=\"132\" src=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2026\/09\/image-6.png\" alt=\"\" class=\"wp-image-5447\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>So you have a folder and within that folder you have a single subfolder (and no other files) at that level, but then some files inside the subfolder. VScode by default will compact path in the GUI. For example I have a folder structure like this: ~\\projects\\ansible-lab\\~\\projects\\ansible-lab\\hosts~\\projects\\ansible-lab\\plays~\\projects\\ansible-lab\\roles The projects folder only contains one folder &#8220;ansible-lab&#8221; &#8230; <a title=\"Stop VSCode Compacting Single Sub-Folders\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=5444\" aria-label=\"Read more about Stop VSCode Compacting Single Sub-Folders\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":4695,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-5444","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-random"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/5444","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5444"}],"version-history":[{"count":1,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/5444\/revisions"}],"predecessor-version":[{"id":5448,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/5444\/revisions\/5448"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/media\/4695"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}