ChangeList icon indicating copy to clipboard operation
ChangeList copied to clipboard

All files in a window have a common history

Open ktaragorn opened this issue 12 years ago • 6 comments

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.

ktaragorn avatar Oct 05 '13 14:10 ktaragorn

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.

randy3k avatar Oct 08 '13 16:10 randy3k

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 .

ktaragorn avatar Oct 09 '13 02:10 ktaragorn

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

randy3k avatar Oct 16 '13 21:10 randy3k

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?)

ktaragorn avatar Oct 17 '13 01:10 ktaragorn

Why did not merged? It looks helpful

skyblue avatar Apr 25 '14 03:04 skyblue

@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...

randy3k avatar Apr 25 '14 04:04 randy3k