OldStarchy / Align-Spaces

7 stars 1 forks source link

futuristic feature checklist #25

Open krisutofu opened 1 year ago

krisutofu commented 1 year ago

I really like the concept and see massive potential but it needs some usability improvements. The core idea of the extension is text visualization, not a text editing, and to get rid of hard coded text alignment which is counter-productive. It should be some automatic intelligence for displaying text which does not modify the stored byte representation and does not mess with the version control system.

I am not expecting this to be implemented in near future but for anyone interested in futuristic features, I write this list:

There are technically two ways to implement character stretches (without thinking of current technology's constraints):

1) transient spaces. These only exist in RAM or other volatile memory but are discarded whenever text is saved to non-volatile memory). The reason being that there are two interface points: one which automatically inserts transient spaces when reading data, one which doesn't. The first is for visual applications, the 2nd one for background applications where visually related information is just noise. Transient spaces would be the clean solution. The only difficult part is for OS maintainers to have a clear algorithm for inserting transient spaces during read operations. 2) virtual coordinates. An overlay coordinate system in the text field for the cursor. These coordinates are purely based on visualization, not on actual character-based coordinates. I think, this is much harder to deal with for text editors because there are so many coordinate transformations involved all the time. It may create compatibility issues with other text fields/editors which implement the alignment differently or not at all.

OldStarchy commented 1 year ago

If https://github.com/microsoft/vscode/issues/13960 ever gets resolved, virtual coordinates will become much easier