• Stars
    star
    511
  • Rank 86,473 (Top 2 %)
  • Language
    Python
  • License
    Other
  • Created almost 13 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Show diffs between the current file, or selection(s) in the current file, and clipboard, another file, or unsaved changes.

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

Preview

Preview

Preview


Help!

Check the wiki for more tips

Installation

Package Control (Easiest)

  1. Using Package Control, install FileDiffs

  2. Install keymaps for the commands (see Example.sublime-keymap for my preferred keys)

Sublime Text 3

  1. Open the Sublime Text Packages folder

    • OS X: ~/Library/Application Support/Sublime Text 3/Packages/
    • Windows: %APPDATA%/Sublime Text 3/Packages/
    • Linux: ~/.Sublime Text 3/Packages/ or ~/.config/sublime-text-3/Packages
  2. Clone this repo

    # Over SSH
    git clone [email protected]:colinta/SublimeFileDiffs
    
    # Over HTTPS
    git clone https://github.com/colinta/SublimeFileDiffs.git
    
  3. Install keymaps for the commands (see Example.sublime-keymap for my preferred keys)

Sublime Text 2

  1. Open the Sublime Text 2 Packages folder

  2. Clone this repo, but use the st2 branch

    # Over SSH
    git clone -b st2 [email protected]:colinta/SublimeFileDiffs
    
    # Over HTTPS
    git clone -b st2 https://github.com/colinta/SublimeFileDiffs.git
    

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)

  1. Preferences > Package Settings > FileDiffs > Settings - Default

  2. 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-settings which could be overloaded for each parameter in a platform specific configuration FileDiffs ($platform).sublime-settings in the Settings - User
  • Environment variable expansions for cmd parameter 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.

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

More Repositories

1

teacup

This project has been sunset in favor of MotionKit
Ruby
604
star
2

motion-xray

An iOS Inspector that runs inside your app, so you can debug and analyze from your device in real-world situations.
Ruby
555
star
3

SublimeStringEncode

Converts characters from one "encoding" to another using a transformation (think HTML entities, not character encodings)
Python
149
star
4

ApacheConf.tmLanguage

Adapted from text mate bundle by GreyWyvern
141
star
5

SublimeChangeQuotes

Converts single and double quotes, and re-escapes quotes within the string
Python
123
star
6

zenburn

SublimeText, iterm, xcode, css, and textmate themes modeled after the vim zenburn theme.
SCSS
109
star
7

Ashen

A framework for writing terminal applications in Swift.
Swift
102
star
8

sweettea

Joins sugarcube and teacup, for great good. Adds handlers, more shortcuts, and some silly classes, to make RubyMotion a total gas.
Ruby
80
star
9

SublimeMarkAndMove

Allows for keyboard-only multiple selections. Select some stuff, mark it, then move the cursor around and add more marks, recall marks, or move between marks.
Python
74
star
10

motion-wiretap

A wrapper for KVO, gestures, UIControl events, and procs. Inspired by ReactiveCocoa.
Ruby
61
star
11

decent-swift-syntax

Uses the new `sublime-syntax` format, which is super easy to work with.
Swift
61
star
12

Mechy

C++
54
star
13

StrangeCase

It's yet another static site generator. Have you seen jekyll? hyde? Yup. Like those.
Python
49
star
14

SublimeCalculate

Select a formula and evaluate it using python.
Python
36
star
15

SublimeMoveText

moves text, similar to TextMate's βŒ˜βŒƒβ†,β†’,↑,↓
Python
34
star
16

SublimeBracketeer

I don't like how Sublime Text indents when I surround existing code in "{}"s. This plugin surrounds and indents sensibly.
Python
29
star
17

AVClub

Ruby
25
star
18

SublimeClipboardManager

A version of the Sublime Text 2 plugin at <http://www.sublimetext.com/forum/viewtopic.php?f=5&t=2260&start=0> that makes for TextMate-like clipboard history.
Python
23
star
19

SublimeScreencastDirector

Python
23
star
20

graymatter

This is a grab-bag collection of UIView subclasses, UIViewController modules, and random tools.
Ruby
21
star
21

dbt

A tool to detect and declare dependencies, and help with debugging.
Ruby
19
star
22

htmlkup

Converts html to coffeekup
JavaScript
14
star
23

Scorerrest

Swift
13
star
24

typewriter

UIView that makes grids and left-to-right layouts easy in RubyMotion.
Ruby
12
star
25

thoughts

The source code companion to my RubyMotion thoughts
Ruby
10
star
26

chomsky

Python
9
star
27

derailed

Ruby
8
star
28

SublimeQuickFind

Does a forward or reverse literal search. Makes it easy to jump to some text.
Python
8
star
29

SublimeSimpleMovements

Adds caret moving and newline entering commands.
Python
8
star
30

einstein-enum

Enums with associated values and polymorphic behavior, inspired by Swift.
Ruby
8
star
31

f

a function tracking system
Shell
7
star
32

TheSheet

Swift
7
star
33

SublimeTextFormatting

Python
6
star
34

SublimeGroupy

Stores and opens named file groups
Python
5
star
35

android-xml

Ruby
5
star
36

Mainframe

A very odd calculator app.
Swift
4
star
37

SublimeTransposeCharacter

transposes characters or lines.
Python
4
star
38

p

Command line password manager written in Python using SQLite
Python
4
star
39

plywood

A template language grammar that looks, feels, and works like Python
Python
4
star
40

SublimeDuplicateSelections

If you have an equal number of empty selections (cursors) and selections, this command will place each selection at the corresponding cursor location.
Python
4
star
41

nsnulldammit

RubyMotion automatically converts NSNull.null instances to nil making it... difficult to store an NSNull instance. This class and category on NSObject might help!
Objective-C
3
star
42

SublimeSetSyntax

Some generic keyboard bindings for 'Set Syntax:'
Python
3
star
43

FreeMem

Wanna know how much memory you've got left? Well OK then.
Objective-C
3
star
44

rabblescay

A word finder.
JavaScript
3
star
45

SublimeTodoodles

Python
2
star
46

tempest

Tempest-inspired shooter for Arduboy
C++
2
star
47

ansible

Ruby
2
star
48

sublime_packages

Sublime packages by colinta
Shell
2
star
49

SkiaPlayground

An easy way to get started with Skia
Java
1
star
50

goodbye-xcode

1
star
51

SublimeTextDebugging

Python
1
star
52

UpNext

Swift
1
star
53

pwman

Arduino
1
star
54

_SublimePackageTemplate_

template to start new SublimePackage projects
Python
1
star
55

ssed

**fed** up with trying to remember sed's weird regex support? Me, too.
JavaScript
1
star
56

punt

Execute shell command when file(s) change
Python
1
star
57

SublimeTextAndroid

Python
1
star
58

ExpoSkiaSandbox

TypeScript
1
star
59

Suss

Swift
1
star