helix icon indicating copy to clipboard operation
helix copied to clipboard

feat: differentiate buffers with same name by progressively adding prior path components

Open atomicptr opened this issue 8 months ago • 0 comments

The Problem

In lots projects its not uncommon to have multiple files with the same name, if you have multiple of them open as separate buffers this can make navigating through them somewhat difficult. This problem gets especially bad with some web frameworks utilizing "file based routers" as for instance in the case of SvelteKit every single page is called "+page.svelte" and the directory name is the thing that actually helps you differentiate them:

image

Solution

One fairly simple way to solve this is by progressively prefixing the buffer name with parts of the path to make it unique, which is what this PR proposes

See the following showing the same setup as before:

image

Or an example from helix:

image

atomicptr avatar Mar 14 '25 11:03 atomicptr