helix
helix copied to clipboard
feat: differentiate buffers with same name by progressively adding prior path components
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:
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:
Or an example from helix: