-
Notifications
You must be signed in to change notification settings - Fork 86
Home
I'm compiling these from issues other users have had...
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.
- On mac:
Sublime Text 2 > Preferences > Key bindings - User
- On windows:
Preferences > Key bindings - User
- On linux:
Preferences > Key bindings - User
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)
-
Open
Preferences
>Package Settings
>FileDiffs
>Settings - Default
. -
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:
- 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.
- Open
- 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).
- Open
- Create a symlink:
- Open
terminal
and runsudo ln -s /Applications/Kaleidoscope.app/Contents/MacOS/ksdiff /usr/bin
; this will create a symbolic link to theksdiff
command line tool.
- Open
- 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), chooseDiff file with Open Tab…
. If everything is setup correctly, thenKaleidoscope.app
will open and you can start comparing the diffs.
- Open two files that you want to compare and run your key binding (