ChangeList
ChangeList copied to clipboard
All files in a window have a common history
This might be against your design goals for this plugin, but for the off chance that you might be ok with it, I am submitting this pull request.
My major changes are as follows -
- All files share a common changelist, so that it is possible to trace back among all of them the history of your modifications.
- The global list dict, now holds different lists for different windows
- I use "points" instead of keys and selections. Points are just an int which is the offset of the cursor, a bit simpler, and easier to understand for me. I still keep most of the key/sel logic to piggy back off of that code
- Key bindings I have changed to be a bit more natural ( < / > for back / front) but this might be again, against your design
- File open is considered a change.
This is kinda rough tho. It works for the most part but there might be minor bugs. I would rather clean up the key/sel stuff. And the json file stuff is probably broken, because I am not sure I understood what they were for. And my keybinding changes have not affected the vintage mode bindings etc.. I can clean this up a bit more if you are interested in merging.
some of your modifications are lovely to have while some of them do not fit my common practice. I will keep your modification in mind and will consider merging some of them for the next revision. thanks.
Thanks, Let me know if you want me to redo my commits according to what you want to merge. Just curious which parts fall into which category?
On 9 October 2013 00:21, Randy Lai [email protected] wrote:
some of your modifications are lovely to have while some of them do not fit my common practice. I will keep your modification in mind and will consider merging some of them for the next revision. thanks.
— Reply to this email directly or view it on GitHubhttps://github.com/randy3k/ChangeList/pull/9#issuecomment-25904950 .
I finally have some times to read your patch.
- All files share a common changelist, so that it is possible to trace back among all of them the history of your modifications.
- The global list dict, now holds different lists for different windows
It may be a good feature to have, but I have to think deeper. Not sure.
- I use "points" instead of keys and selections. Points are just an int which is the offset of the cursor, a bit simpler, and easier to understand for me. I still keep most of the key/sel logic to piggy back off of that code
It may not be a good idea as one of the selling point of ST is the multi cursor editing ability.
- Key bindings I have changed to be a bit more natural ( < / > for back / front) but this might be again, against your design
- File open is considered a change.
no comments
- And the json file stuff is probably broken, because I am not sure I understood what they were for
Actually, one of the biggest applications of changelist is related to the jason file. It saves the change list history when the file is closed and loads the history when the file is reopened
As for the changelist history persistance, I am not sure what scale of time we are talking, but this was the reason I chose points, and as it stands, history is persisted as long as the window is open, and within a global 50 change limit. Your arg against points is quite interesting, I havent used that feature productively myself, but I see what you mean. It might still be possible I guess (array of points perhaps?)
Why did not merged? It looks helpful
@ktaragorn has removed some of the key features of the original version. For example, the ability of saving the changes when the file is closed and support of multiple cursors...