Skip to content
colinta edited this page Nov 9, 2012 · 7 revisions
Some helpful tips

I'm compiling these from issues other users have had...

Keybindings

This information is not specific to the FileDiffs command. Any package that exposes a command can be assigned a custom key binding this way. Rather than provide defaults that the user can override, I prefer to provide a file called Example.sublime-keymap and leave it up to the user to add key bindings as she/he sees fit.

Locating the user key binding file
  • On mac: Sublime Text 2 > Preferences > Key bindings - User
  • On windows: Preferences > Key bindings - User
  • On linux: Preferences > Key bindings - User
Locating Example.sublime-keymap

The Example.sublime-keymap file is located in the SublimeFileDiffs folder within the Packages/ folder.

  • Windows: %APPDATA%\Sublime Text 2 (e.g. `C:\Users\username\AppData\Sublime Text 2\Packages)
  • OS X: ~/Library/Application Support/Sublime Text 2 (e.g. /Users/username/Library/Application Support/Sublime Text 2/Packages)
  • Linux: ~/.Sublime Text 2 (e.g. /home/username/.Sublime Text 2/Packages)

Add external diff tool

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

  2. Uncomment one of the examples or write you own command to open an external diff tool of your choice.

IMPORTANT: Dont forget to make a correct symlink (e.g. in /usr/bin) pointing to the command line tool of your external diff tool. For example, if you're running Mac OS X Mountain Lion and you want to use Kaleidoscope:

  1. Add your key bindings:
    • Open Sublime Text 2 > Preferences > Key Bindings - User and add { "keys": ["ctrl+shift+d"], "command": "file_diff_menu" }.
    • Here's an example.
  2. Add a command:
    • Open Sublime Text 2 > Preferences > Package Settings > FileDiffs > Settings - User and add "cmd": ["ksdiff", "$file1", "$file2"].
    • Here's an example (just uncomment the the ksdiff line).
  3. Create a symlink:
    • Open terminal and run sudo ln -s /Applications/Kaleidoscope.app/Contents/MacOS/ksdiff /usr/bin; this will create a symbolic link to the ksdiff command line tool.
  4. Compare files:
    • Open two files that you want to compare and run your key binding (ctrl + shift + d).
    • From the menu that opens (file_diff_menu, see below), choose Diff file with Open Tab…. If everything is setup correctly, then Kaleidoscope.app will open and you can start comparing the diffs.
Clone this wiki locally