CM6 feature proposal
Support for each line in the editor to have unique id that would be retained in memory for the duration of the session, and which could be re-loaded later for new sessions.
Persistent line ids can be used as a reference to later link to specific lines, or associate comments or line highlights.
When new line is created in the editor, it’s assigned a unique
idand kept in memory. Probably a hash of sufficient entropy so as to minimize shadowing when a line is later removed (its
iddestroyed) and new line created elsewhere.
Or better yet, allow users to supply their own id generator.
The editor should try to retain line
idacross various modifications (either done via API or user interaction), such as when:
- lines are swapped (e.g. via SublimeText keymap)
- when you prepend/paste a newline at the start of line
- when folding
- when lines are moved e.g. via select + drag, or via cut + paste
Ability to export/import the line ids (e.g. as array of ids) so that they can be persisted to server, and later fetched and reloaded for new editor session.
I’m thinking one could add this to CM5, but IMO better if the editor can do this natively or allows easy bake-in via plugin, hence CM6 (if this makes sense to you guys).