FileDiffs
Shows diffs between the current file, or selection(s) in the current file, and clipboard, another file, or unsaved changes. With contributions from Sebastian Pape (spape) and Jiri Urban (jiriurban)
Details
Installs
- Total 334K
- Win 181K
- Mac 102K
- Linux 51K
| Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | Sep 19 | Sep 18 | Sep 17 | Sep 16 | Sep 15 | Sep 14 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 8 | 12 | 6 | 3 | 5 | 14 | 17 | 19 | 19 | 14 | 16 | 3 | 17 | 28 | 12 | 12 | 5 | 8 | 12 | 8 | 17 | 12 | 20 | 7 | 10 | 6 | 18 | 11 | 15 | 15 | 13 | 7 | 9 | 16 | 21 | 23 | 15 | 18 | 2 | 4 | 11 | 17 | 17 | 10 | 14 | 11 |
| Mac | 11 | 9 | 18 | 2 | 4 | 6 | 17 | 26 | 19 | 7 | 6 | 4 | 11 | 15 | 21 | 17 | 17 | 6 | 2 | 19 | 9 | 17 | 17 | 12 | 5 | 10 | 12 | 12 | 19 | 18 | 17 | 3 | 4 | 13 | 18 | 25 | 13 | 8 | 2 | 4 | 15 | 15 | 13 | 13 | 12 | 5 |
| Linux | 2 | 2 | 1 | 3 | 4 | 6 | 3 | 8 | 3 | 3 | 2 | 1 | 5 | 2 | 5 | 7 | 2 | 3 | 1 | 5 | 5 | 2 | 3 | 5 | 0 | 0 | 0 | 3 | 4 | 4 | 4 | 3 | 1 | 3 | 4 | 3 | 0 | 5 | 1 | 1 | 4 | 5 | 1 | 5 | 6 | 2 |
Readme
- Source
- raw.githubusercontent.com
FileDiffs Plugin
Shows diffs between the current file, or selection(s) in the current file, and clipboard, another file, or unsaved changes. Can be configured to show diffs in an external diff tool
Preview
Help!
Check the wiki for more tips
Installation
Using Package Control, install FileDiffs or clone this repo in your packages folder.
I recommended you add key bindings for the commands. I've included my preferred bindings below. Copy them to your key bindings file (⌘⇧,).
Add External Diff Tool (optional)
(IMPORTANT: You might need to make a symlink (e.g. in /usr/local/bin) pointing to the command line tool of your external diff tool)
Preferences > Package Settings > FileDiffs > Settings - Default
Uncomment one of the examples or write your own command to open external diff tool.
This command may need to be a full path (e.g. /usr/local/bin/ksdiff), if the command isn't in your PATH.
It supports:
- A generic setting
FileDiffs.sublime-settingswhich could be overloaded for each parameter in a platform specific configurationFileDiffs ($platform).sublime-settingsin theSettings - User - Environment variable expansions for
cmdparameter in the settings
Commands
file_diff_menu: Shows a menu to select one of the file_diff commands. If you use the bindings in Example.sublime-keymap, this is bound to ctrl+shift+d.
The rest of the commands do not need to be bound (accessible from the menu):
file_diff_clipboard: Shows the diff of the current file or selection(s) and the clipboard (the clipboard is considered the “new” file unless reverse is True)
file_diff_selections: Shows the diff of the first and second selected regions. The file_diff_menu command checks for exactly two regions selected, otherwise it doesn't display this command.
file_diff_saved: Shows the diff of the current file or selection(s) and the saved file.
file_diff_file: Shows the diff of the current file or selection(s) and a file that is in the current project.
file_diff_tab: Shows the diff of the current file or selection(s) and an open file (aka a file that has a tab).
file_diff_previous: Shows the diff of the current file or selection(s) and the previous activated file. If a file is not saved yet, dirty buffer is used instead of reading from disk.
If FileDiffs has to use temporary files, they are created in your Data/Packages folder (rather than system temp folder) due to privacy concerns for portable Sublime Text installations. Temporary files are automatically removed after 15 seconds.
Key Bindings
Copy these to your user key bindings file.
{ "keys": ["ctrl+shift+d"], "command": "file_diff_menu" },
{ "keys": ["ctrl+shift+e"], "command": "file_diff_menu", "args": {"cmd": ["opendiff", "$file1", "$file2"] } },
Contributors
Thanks to:
- Sebastian Pape for adding support for using an external diff tool
- Starli0n for merging the ST2 and ST3 branches into one branch,
- and for adding the “Diff file with previous” feature
- dnsmkl for helping with diffing temporary files