Nicolab / atom-local-history

Atom package for maintaining local history of files.
Other
77 stars 9 forks source link

adding possibility to open diff in internal atom tools #38

Closed martin-reznik closed 8 years ago

martin-reznik commented 8 years ago

Adding possibility to use protocol: in difftool command settings to make it possible to open diff directly in Atom

Nicolab commented 8 years ago

Thank you for your PR.

Please, you have an example of a command to open the diff in Atom ?

martin-reznik commented 8 years ago

That functionality is provided via compare-files pugin (https://github.com/floydpink/atom-compare-files). Unfortunately there is a bug, which kindof made it not-working... :( But fix was already submitted and merged to main branch (https://github.com/floydpink/atom-compare-files/pull/39) :)

This plugin registers new open-file handler (compare-files:), which then can be used as input for workspace.open(). So with it installed, you can open diff of any two files like this: atom compare-files://editor//somefile.../somefile.

Nicolab commented 8 years ago

Nice, thank you :)

To anticipate some possible changes, it would be helpful to put a prefixed namespace with the Atom protocol like atom://compare-files: What do you think ?

No need to do another PR for that, I will add this prefix in another commit after the merge.

Nicolab commented 8 years ago

Hello,

do you have an example of setting?

compare-files://{current-file}...{revision-file}

and

compare-files://editor/{current-file}...{revision-file}

doesn't work