sminez / ad

an adaptable text editor
https://crates.io/crates/ad-editor
MIT License
264 stars 10 forks source link

Add acme style window tags #26

Open sminez opened 1 month ago

sminez commented 1 month ago

Please describe the change / addition you'd like to see made

The tag in acme is a convenient scratchpad for holding text that you want to make use of in relation to a specific buffer, with execute and load events being considered running for the file the tag is attached to. It also provides a really simple way of handling things like renaming files or swapping out one file for another rather than opening a new window.

One thing I'll need to have a think about is how this interacts with ad's approach to buffer management and proposed window layout behaviour in #9. In acme every open file has a window. The user is able to hide some of those windows if desired but really the "thing" you work with in acme is a visible window, not a buffer that may or may not be visible in one of several windows currently open in the UI.

@mathuin on Mastodon suggested the possibility of having the tag be rendered using the minibuffer, making it detachable and something the user could show / hide on demand. That could be an interesting idea to explore but the implementation would need to be something other than the current mini-buffer as that has a fair amount of custom logic to it in order to grab input and act as a dynamic filter as the user types, rather than being a "real" buffer.

Is this a feature you have seen in other text editors?

This is a key part of the acme UI: http://doc.cat-v.org/plan_9/4th_edition/papers/acme/