Sublimerge 3 documentation

Configuration

Default key bindings

In file view

  • ctrl + alt + d - display Quick Panel with Sublimerge commands available for current view.

In files diff view

Windows/Linux

  • ctrl + down - select next change
  • ctrl + up - select previous change
  • ctrl + left - copy selected change (or active line*) to left from right
  • ctrl + right - copy selected change (or active line*) to right from left
  • ctrl + shift + left - copy all changes to left from right
  • ctrl + shift + right - copy all changes to right from left

OS X

  • alt + down - select next change
  • alt + up - select previous change
  • alt + left - copy selected change (or active line*) to left from right
  • alt + right - copy selected change (or active line*) to right from left
  • alt + shift + left - copy all changes to left from right
  • alt + shift + right - copy all changes to right from left

* - if change is selected the command will copy its whole contents, otherwise will copy only the focused line

Common

  • F3 - swap panels
  • F5 - recompare buffers

In directories diff view

Common

  • enter - enter subdirectory or diff selected text file
  • down - select next file/directory
  • up - select previous file/directory
  • backspace - enter parent directory
  • right - apply selected change from left to right
  • left - apply selected change from right to left
  • F3 - swap panels

Windows/Linux

  • ctrl + down - select next different file/directory
  • ctrl + up - select previous different file/directory

OS X

  • alt + down - select next different file/directory
  • alt + up - select previous different file/directory


For convenience Sublimerge also supports the following key bindings for OS X:

  • cmd + down - enter subdirectory or diff selected text file
  • cmd + up - select next file/directory

Changing bindings

Key bindings

  • Open Preferences > Package Settings > Sublimerge > Key Bindings - User
  • Copy content from Preferences > Package Settings > Sublimerge > Key Bindings - Default
  • Modify the entries you want and save the file
page=Support2 Do not modify Key Bindings - Default file. This file is overwritten each time Sublimerge is upgraded.

Default settings

Just like Key Bindings , configuration options should not be edited in Settings - Default file, otherwise they will be overwritten when Sublimerge is upgraded. To change settings, copy the entries that you want to modify to Settings - User file and edit there.

General

date_format %a %b %d %H:%M:%S %Y
General date format to be used in various places.
use_current_window false
EXPERIMENTAL! Defines whether or not the diff view should be displayed in current Sublime window.

This setting does not affect directories diff view which always opens in new window.

same_syntax_only true
Limits the list of comparable views only to the ones with the same syntax. This applies to Compare to View.. and Compare Selection in Views... commands. Setting this to false will show all opened views in the list.
intelligent_files_sort true
Orders the list of comparable views by file name similarity. This applies to Compare to View... and Compare Selection in Views... commands. Setting this to false will order the list as the views are ordered in window.
compact_files_list true
Makes the items in the list of comparable views to be displayed in a more compact way where file name and file path are separated. Set this to false if you want the list to contain full file path only.
macros_in_separate_menu false
When set to true, all defined Macros will be displayed in a separate menu after pressing ctrl + alt + d under Run Macro... option.
macros_in_command_palette true
This will display macros in Sublime's Command Palette. If you notice performance impact while opening Command Palette, you can switch this off.
debug false
Turns on/off debug mode. In debug mode Sublimerge prints debugging information into console.

Diff algorithm

algorithm patience
Defines which diff algorithm should be used. Possible values: patience (recommended) or null for standard algorithm.
ignore_whitespace []
Defines how to deal with whitespace differences. By default Sublimerge does not ignore whitespaces while comparing files, so each difference in them causes the files to be considered as different. A list containing any combination of the following begin, middle, end.

This setting is a live setting and can be changed while being in diff view via context menu.

ignore_crlf true
Defines how to deal with CR/LF line endings differences. By default Sublimerge ignores line endings, so any differences between them will not cause the files to be considered as different.

This setting is a live setting and can be changed while being in diff view via context menu.

ignore_case false
Defines how to deal with case differences. By default Sublimerge's diff algorithm is case-sensitive. If you want to make it case-insensitive, set this to true.

This setting is a live setting and can be changed while being in diff view via context menu.

intraline_analysis true
Determines whether to perform intraline differences analysis within each of the change blocks. It is only used to mark intraline changes and does not affect general difference analysis. When you work with big files with lots of changes and get performance problems, you can switch this off.

This setting is a live setting and can be changed while being in diff view via context menu.

intraline_changes_threshold 60
Ratio, calculated as: (length of changed parts / length of unchanged parts) * 100. When ratio gets greater than this value, intraline changes are not displayed and line is considered as fully replaced rather than modified.
intraline_combine_threshold 3
Makes small spans of unchanged text, with the length lower or equal this value, to be marked as part of intraline change if they appear between two other intraline changes. This eliminates noisy highlights within the line.
intraline_unimportant_regexps []
All strings matching these regular expressions will be marked as unimportant while doing intraline differences analysis. They apply to a line so ^ and $ operators will match line begin and line end. Expressions are case-sensitive.

Important Notes:

  • Expressions are applied in order of appearing in this list.
  • Expression must have at least one capturing group - only capturing groups are considered to be treated as unimportant.
  • You should not use nested capturing groups. If your expression requires nested groups, mark the other ones as non-capturing using ?: operator, i.e. (?:small\s+(cat|dog))?. Otherwise it will result in undefined behavior.
  • Implementation of this feature may change in the future.

Example: ["\d+(st|nd|rd)"] - mark as unimportant only st, nd, rd following any number


This is an experimental feature and its implementation may change in the future.

intraline_unimportant_style outlined
Just like intraline_style but for unimportant differences.

Diff view

General

scroll_sync_interval 1
Defines how often (in milliseconds) views scroll should be synchronized.
The value of 1 is the mininum value and is proved to be safe. However if you get stability/performance problems, you should change this to greater value.
summary_panel true
Defines if summary panel should be displayed. This panel shows differences between adjacent lines or currently selected blocks. This is helpful to easily view long lines that are affected by the change.
diff_view_allowed_commands {}
User-defined whitelist for commands to be available to run in diff view. Some commands may cause the diff view to work not properly and lead to undefined behavior. Use with caution!
beyond_viewport_rendering 0.25
Defines additional area (before and after viewport) that will be rendered while scrolling the view. It is a percentage value. For example:

0 - render viewport only,
0.25 - render viewport + 25% before and after
0.5 - render viewport + 50% before and after
1 - render viewport + 100% before and after

Notice: Please keep in mind that the more is prerendered, the slower the view can be.

view
A group of settings that are built-in and supported by Sublime Text. They will be applied to views used in diff window.
More settings can be found in Preferences > Settings - Default.
line_numbers false
Defines whether to display line numbers in gutter. By default set to false because of misleading when displaying missing blocks that spans several lines.
word_wrap false
Defines whether to wrap words when they overflow a line. By default set to false because it solves view scroll sync and readability issues.
draw_white_space all
Defines whether to display tabs and spaces. Useful when visually comparing differences.
highlight_line true
Highlights corresponding lines in all diff views.

Navigation

auto_select_first false
Defines whether first change block should be automatically selected when entering diff view.
three_way_navigate_all false
Defines how to navigate through changes in three-way diff view. Switch to true if you want to navigate through all changes instead of conflicts only. This can be changed from views' context menu.

Style

diff_block_renderer gutter
The renderer to be used to draw changes. Possible values:

gutter - renders using gutter icons. Elegant and detailed but a little slower than outline
outline - renders using outlines around text. Less elegant and readable but faster than gutter

diff_block_changed #FDECAC
Color when content of difference exists in both files
diff_block_conflict #FF0000
Color when changes are conflicting with each other
diff_block_inserted #64BF0E
Color when content of difference exists in left file, but does not exist in right one
diff_block_deleted #F92672
Color when content of difference exists in right file, but does not exist in left one
diff_block_intraline_changed #FDECAC
Fill color for intraline changes marks (change).
diff_block_intraline_inserted #FDECAC
Fill color for intraline changes marks (insertion).
diff_block_intraline_deleted #FDECAC
Fill color for intraline changes marks (deletion).
diff_block_missing #75715E
Fill color for missing lines block
diff_block_selected #75715E
Fill color for selected blocks.
summary_panel_background null
Background color for summary panel. Helpful when your summary panel is confluencing with diff panels. Set to null for color from current color scheme.
intraline_style filled
How to draw intraline changes: outlined, filled, solid_underline, squiggly_underline, stippled_underline.
The best choice is outlined or filled. Underlines are not drawn by Sublime Text under whitespaces.

3-way diff view

three_way_layout 0
Defines layout type for three-way diff view.

0 - three columns (theirs, merged, mine)
1 - two rows (1st divided into two columns: theirs, mine; 2nd - merged output)

three_way_merged_height 50
Defines percentage height of merged pane when three_way_layout = 1
go_to_next_after_merge true
Defines whether should view automatically go to the next change after merging previous one.

Shell

shell_fallback_encoding ascii
When VCS-related commands does not work and Sublimerge displays an error message about encoding problems, you may need to set encoding that is compatible with your system's locale.
environment {}
Sometimes the underlying shell commands (i.e. git, svn, hg) requires some environment variables to be set. This is the place where you can define them. This is a dictionary where key is a variable name and value is value to set.

VCS support

vcs_support true
Turns on/off VCS support. Requires Git, Subversion or Mercurial to be installed first.
vcs_cache_enabled true
Whether VCS cache should be enabled. A VCS cache is a mechanism that caches discovered paths to repositories roots in order to boost overall performance when VCS support is enabled. It also caches paths where no repository is found so that Sublimerge will not traverse your directories when need an information if given file is versioned or not.
vcs_cache_validate_on_startup true
Defines whether VCS cache should be validated upon Sublime Text startup. You may want to disable this when you get performance problems while Sublime Text is starting up.

All paths will be cached permanently. When you start receiving errors related to missing repositories (and/or VCS commands are not present when they should), you may need to use one of the following Command Palette commands in order to make the cache consistent: Sublimerge: Purge VCS Cache, Sublimerge: Validate VCS Cache

vcs_discovery_order ['git', 'hg', 'svn']
Defines the order in which VCS should be discovered. This is useful when using multiple VCS setup for a single project. Affects VCS-related commands.
vcs_after_merge_cleanup true
Defines whether to perform cleanup of temporary files created by VCS during merge.

Git

git_executable_path git
Path to git executable. Especially when you are on Windows, you will need to change it to something like C:\\PROGRA~1\\Git\\bin\\git.exe or C:\\PROGRA~2\\Git\\bin\\git.exe
git_log_args --encoding=UTF-8 --no-color --no-decorate --follow
Additional arguments for git log command. You should not remove the default ones unless you are sure. Feel free to add the new ones. This setting is used when retrieving list of revisions.
git_show_args <empty>
Additional arguments for git show command. This setting is used when downloading file revision.
git_global_args -c color.ui=false
Adds default arguments for all Git commands. Primarily used to fix some issues resulting from non-standard Git settings.
Git log parsing
git_log_format %H\t%h\t%an <%ae>\t%ai\t%s
Log format that will be passed to: --format=pretty:<here>
git_log_date_parse_format %Y-%m-%d %H:%M:%S %z
Format to parse date from Git log. Required for ${date} and ${date_user} calculation.
git_log_regexp ^(?P<commit>.+)\t(?P<abbrev_commit>.+)\t(?P<author>.+)\t(?P<date_raw>.+)\t(?P<subject>.*)$
Regular expression to parse the log output. The following groups are mandatory: commit, date_raw
git_log_template ["${abbrev_commit} | ${subject}", "by ${author}", "${date}"]
Defines a template for commits log item. Variables names refers to matching groups names. Each array item is a separate line.
Other available variables:

${date} - displays relative date
${date_user} - displays date as defined in date_format setting

These settings affects the Git log parser so please change them with caution.

Subversion (SVN)

svn_executable_path svn
Path to svn executable. Especially when you are on Windows, you will need to change it.
svn_log_args --stop-on-copy
Additional arguments for svn log command. This setting is used when retrieving list of revisions.
svn_cat_args <empty>
Additional arguments for svn cat command. This setting is used when downloading file revision.
svn_global_args <empty>
Adds default arguments for all Subversion commands.
SVN log parsing
svn_log_date_parse_format %Y-%m-%dT%H:%M:%S.%fZ
Format to parse date from SVN log. Required for date and date_user calculation.
svn_log_template ["${commit} | ${subject}", "by ${author}", "${date}"]
Defines a template for commits' log. Each array item is a separate line.
Available variables:

${date} - relative date format
${date_user} - detailed date as defined in date_format
${date_raw} - date as returned by SVN
${commit}
${subject}
${author}

These settings affects the Subversion log parser so please change them with caution.

Mercurial

hg_executable_path hg
Path to hg executable. Especially when you are on Windows, you will need to change it.
hg_log_args --encoding=UTF-8
Additional arguments for hg log command. This setting is used when retrieving list of revisions.
hg_cat_args <empty>
Additional arguments for hg cat command. This setting is used when downloading file revision.
hg_global_args <empty>
Adds default arguments for all Mercurial commands.
Mercurial log parsing
hg_log_format {node}\t{author}\t{date|isodate}\t{desc}
Log format that will be passed to: --format=pretty:<here>
hg_log_date_parse_format %Y-%m-%d %H:%M %z
Format to parse date from Mercurial log. Required for ${date} and ${date_user} calculation.
hg_log_regexp ^(?P<commit>.+)\t(?P<author>.+)\t(?P<date_raw>.+)\t(?P<subject>.*)$
Regular expression to parse the log output. The following groups are mandatory: commit, date_raw
hg_log_template ["${abbrev_commit} | ${subject}", "by ${author}", "${date}"]
Defines a template for commits log item. Variables names refers to matching groups names. Each array item is a separate line.
Other available variables:

${date} - displays relative date
${date_user} - displays date as defined in date_format setting

These settings affects the Mercurial log parser so please change them with caution.

Directories comparison

dir_compare_ignore_dirs ['RCS', 'CVS', 'tags', '.git', '.svn', '.hg']
List of directories' names which should be ignored while doing comparison. They will be also ignored while copying.
dir_compare_ignore_files ['.DS_Store', 'Thumbs.db']
List of files' names which should be ignored while doing comparison. They will be also ignored while copying. You can specify wildcards here, i.e. *.tmp.
dir_merge_remove_unmatched false
If a directory exists in both sides and you copy one onto another, Sublimerge, by default, copies all changed or added files from source to target directory. When this setting is true, it will also delete all files that exists in target, but not in source. Use with caution.
dir_compare_open_text_diff_in_new_window false
Set to true if you want text diff to be opened always in a new window.

Snapshots

snapshots_on_open true
Defines whether to automatically create snapshots when a file is opened.
snapshots_on_save false
Defines whether to automatically create snapshots each time a file is saved.
snapshots_in_menu true
Defines whether to show Snapshots' commands in main Sublimerge's menu.
snapshots_date_format %d/%m/%Y %H:%M:%S
Format for dates to be displayed in Snapshots' menu.

Syntax specific settings

syntax_specific
This section contains specific settings for various file types. All settings defined here will override the global ones. Syntax name is equal to that displayed in the bottom right corner of editor.

Example:

"syntax_specific": {
    "Python": {
        "ignore_whitespace": false,
        "ignore_crlf": false,
        "view": {
            "draw_white_space": "all"
        }
    }
}
                        
I serve cookies to improve your experience on this website. If you continue without changing your browser settings, I will assume that you accept the cookies. You can change your browser settings at any time.