facelessuser / easydiff Goto Github PK
View Code? Open in Web Editor NEWAn intuitive context menu based diff plugin for Sublime Text http://facelessuser.github.io/EasyDiff/
License: MIT License
An intuitive context menu based diff plugin for Sublime Text http://facelessuser.github.io/EasyDiff/
License: MIT License
Do not diff the literal last revision of the repo, but the last revision in which the file was modified.
Hey there,
Thanks for creating such an excellent package, it's far easier to use and configure than some of the other options!
I am, however, having a little trouble getting the external tool option to work. I'd like to setup EasyDiff to let me use Kaleidoscope, I've installed the Command-Line Tool and using the following syntax in the Terminal works fine:
I think I have things setup correctly in the preferences (/Users/cwhite/Library/Application Support/Sublime Text 3/Packages/User/easy_diff.sublime-settings).
{
// Show internal diff options (Easy Diff in a view or buffer)
"show_internal": true,
// Show external options (options to send files to external diff tool)
"show_external": true,
// External diff tool path (absolute)
"external_diff": "ksdiff",
// Turn off svn completely
"svn_disabled": true,
// Turn off git completely
"git_disabled": false,
// Turn off (Mercurial) hg completely
"hg_disabled": true,
}
But I don't see any option to open the file in an external diff tool anywhere in the context menu.
I've tried...
show_internal
to false
to make sure they weren't overwriting each other./usr/bin/ksdiff
(the symlink) and /Applications/Kaleidoscope.app/Contents/MacOS/ksdiff
(the actual file).I know the settings file is working correctly because disabling internal or any of the source control options works fine.
System
Any ideas?
Thanks!
Hi,
I like the way an old plugin works to diff 2 files (using the active view and the last activated view), I've adapted it to works with your plugin.
Maybe you want to add this feature to EasyDiff.
Thanks for your works and for sharing it !
import sublime, sublime_plugin
class CompareFileListener(sublime_plugin.EventListener):
viewA = viewB = None
def on_activated(self, view):
group, index = view.window().get_view_index(view)
if group != -1:
if (group, index) != self.viewA:
CompareFileListener.viewB = CompareFileListener.viewA
CompareFileListener.viewA = (group, index)
class CompareFileCommand(sublime_plugin.WindowCommand):
def run(self):
self.window.run_command("easy_diff_set_left", {"group": CompareFileListener.viewB[0], "index": CompareFileListener.viewB[1]})
self.window.run_command("easy_diff_compare_both_view", {"external": True})
def is_enabled(self):
return bool(CompareFileListener.viewA and CompareFileListener.viewB)
[
{
"caption": "Diff: Last 2 active view",
"command": "compare_file"
}
]
The right click menu in my one Git project takes about ~5 to 15 seconds to open.
I have noticed that this delay disappears entirely when I disable EasyDiff, enabling it brings the phenomenon back.
Procmon shows that plugin_host.exe spawns many git processes in sequence, also some svn and some hg processes.
The timestamps on these processes correspond exactly with when I press rightclick and when the context menu eventually appears. The two time stamps are start and end time of the process, respectively.
In this image (EasyDiff enabled) you that VCS related processes started for about 12 seconds for the context menu, that's with EasyDiff enabled:
This is a project with thousands of small files, most of which are ignored through .gitignore
Without EasyDiff, there are no git invocations that coincide with the opening of the context menu:
I opened the context menu at 10:44:25 and again at 10:44:30 and stopped recording at 10:44:36. As you cans see, zero processes started during that time by plugin_host.exe
I have also closed sublime and reopened it in an completely new folder and put an empty txt file in it. The folder is near the root of the drive such that no program needs to traverse many parents to look for a VCS root.
This is the result when I right-click within that file
The right click menu took several seconds to open. Again, the phenomenon goes away completely when I disable EasyDiff.
Related: #10
Any thoughts on this issue?
Running Windows 10, latest updates, x64
I've installed the EasyDiff package through the package manager, but the context menus (as I understand them) don't show any EasyDiff options. Perhaps you could clarify what you mean by "context menu"?
I'm using a right-click in Sublime Text 2 2.0.2 build 2221 on 10.9.4. I've restarted both Sublime Text and the OS.
I'm attaching images of what I see when I open the context menu, and the top item when I "List Packages".
I'd love to add this plug-in but I customise my context menu - with it being added to dynamically by this plugin it is a little too invasive for me to use. Is the dynamic element necessary - could a static context menu be used instead? Thanks,
I want to simplify easy diff target selections.
Would it be possible to add shortcuts for common operations.
For example, Im using this mainly for comparing the current tab with the previously active, would be nice to have that accessible from a shortcut.
Context menu opening is really slow when I use this plugin. Running ST3 on windows.
This adds a noticeable latency to right clicks in Sublime Text 3 on Windows.
Please add some screenshots
For me using EasyDiff means upgrading from ST2 to ST3 and seemingly breaking some other plugins, so it is kinda hard to make a decision :)
It would be nice to have EasyDiff accessible from sidebar as well.
Will probably need some extra code to handle the files if they are not already open.
I'm following instructions here step by step.
It will not show up on any windows context menus or within sublime at the locations you describe.
I am using Windows 10.
[email protected]
steps to reproduce:
I think the fix is that EasyDiff needs to delete any pre-existing temp files when the command is executed, prior to calling the actual svn diff command.
Traceback below:
Traceback (most recent call last): File "easy_diff_version_control in <path to my portable sublime>\Data\Installed Packages\EasyDiff.sublime-package", line 161, in is_loaded File "easy_diff_version_control in <path to my portable sublime>\Data\Installed Packages\EasyDiff.sublime-package", line 182, in diff File "easy_diff_version_control in <path to my portable sublime>\Data\Installed Packages\EasyDiff.sublime-package", line 144, in external_diff File "easy_diff_version_control in <path to my portable sublime>\Data\Installed Packages\EasyDiff.sublime-package", line 275, in get_files File "lib.svn in <path to my portable sublime>\Data\Installed Packages\EasyDiff.sublime-package", line 231, in export File "lib.svn in <path to my portable sublime>\Data\Installed Packages\EasyDiff.sublime-package", line 63, in svnopen AssertionError: Runtime Error: b"svn: E200009: Destination file '<path to my local appdata>\\Temp\\easydiff84zli9\\myFileName-rBASE-LEFT.py' exists, and will not be overwritten unless forced"
OSX seems to always return that a files are versioned on OSX. This problem does not exist on Windows.
Hi,
I have my user directory synced between different machines. Some are Windows based, some are Linux. Is it possible to tell EasyDiff to use different external viewers based on the OS? I'd like to use Beyond Compare on Windows and Kompare on Linux.
Thanks!
Allow the disabling of svn and git menu items if they are not desired.
Should be pretty easy.
It might be nice to revert differences quickly. Look into implementing a revert command for each version control system. Feels like this might be a nice and appropriate addition.
in hg.py, several calls to hgopen() are missing the second argument (dirname(target)), leading to EasyDiff reporting the file is not part of a repository because it uses the default CWD instead of the target directory.
I installed EasyDiff, - using windows, and noticed that for a file on a remote network directory, the right click menu would only come up after several seconds.
The same file locally would give no problem.
I disabled EasyDiff and the the right click menu on the remote file worked again.
The remote network isn't fast and may have peculiar permissions, but the effect was there with the plugin enabled and not with the plugin disable.
Kind Regards, John.
Does it make sense to reduce dependencies to only mdpopups
?
{
"*": {
">=3124": [
"mdpopups"
]
}
}
It appears to come along with everything needed and is itself only needed for support.py
.
Could anyone create a quick video on the features and how to use Easy Diff?
hi, I can't install via install package menu in sublime text 2
Would it be possible to compare two selections if two and only two selections are selected.
So if you use cmd to select two parts of the same view, can the menus show a new Compare selections options?
Thanks,
A
Is there a way to ignore whitespace when doing a diff? If I want to compare two blocks of code, but one block is indented further than the other, the diff is useless.
It's really cumbersome to ask for a new diff after one file is updated. it would be great if this plugin watches file changes and update the diff automatically
Sorry , if it is a ST2 related issue. Unfortunately, the plugin is not available for installation via ST Package Control on:
- SublimeText 2
- build 2221
- OS X 10.10.3.
Any tips on how to install it ? Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.