jisaacks / GitGutter

A Sublime Text 2/3 plugin to see git diff in gutter
MIT License
3.88k stars 224 forks source link

[Feature] display current line changes #214

Closed druellan closed 4 years ago

druellan commented 9 years ago

I know this was discussed several times, but I started to use Modific and @gornostal achieves this using a shortcut/command and the console panel. Is not as ideal as using a popup/codehint, but giving the lack of proper API I believe it is a good solution.

Also I'm wondering how difficult could be to open a gif-diff of the file on another tab, and highlight/gutter/position the cursor near the diff corresponding to the current code line.

On both cases you not only have the changes on sight, but also you can copy/paste code as needed.

What do you think?

jisaacks commented 9 years ago

giving the lack of proper API I believe it is a good solution.

I never wanted to implement this into git gutter because I didn't want to add any features that I could not polish.

What do you think?

I actually had an idea to split git gutter out into 2 packages:

This would allow for any plugins to be built on top of the engine. Without bloating the hell out of GitGutter.

I actually had a working prototype a couple months ago, but I have been so busy with my new job I haven't had any time for Open Source.

Also, this would probably be the first ST package (first I know of) that would have a dependency on other packages. Would be nice if package control supported that kind of thing.

druellan commented 9 years ago

I never wanted to implement this into git gutter because I didn't want to add any features that I could not polish.

I see your point and I can say that watching how clunky sublime become if you start messing with plugins, I can't disagree. For me, this is functionality that worth to be included on this module, but even with the new popup API, sublime is not well suited for it, so, OK!

This would allow for any plugins to be built on top of the engine. Without bloating the hell out of GitGutter.

Yes, that's interesting. I'm currently using SublimeLinter, that has a similar approach, and the third party plugins really enrich the experience, and even I'm thinking on contributing with my own code.

Also, this would probably be the first ST package (first I know of) that would have a dependency on other packages. Would be nice if package control supported that kind of thing.

Not sure if SublimeLinter does exactly what you have in mind, but if you don't know about it, take a look how this is working for them.

jisaacks commented 9 years ago

@druellan, Awesome, I had no idea someone was doing something similar. If I ever get time to look into that again I will compare and see how they tackled the problem. Thanks for the info.

deathaxe commented 4 years ago

GitGutter provides the diff popup which displays the content of the previous revision or the diff of it. Beyond that ST can display diffs via its minidiff feature. If that's not enough Sublime Merge may help. So GitGutter won't receive anything beyound the current diff popup.