DIFFUSE(1)
π NAME π
diffuse β a graphical tool for merging and comparing text files. That's the whole vibe bestie, and it's iconic fr.
β¨ SYNOPSIS β¨
diffuse [-h | -? | --help | -v | --version]
diffuse [--no-rcfile | --rcfile file] [[option...] | [file...]...]
π¦ DESCRIPTION π¦
Okay so listen. Diffuse is a graphical tool for merging and comparing text files. And when I say it compares files, I mean it will lowkey compare an arbitrary number of files side-by-side (no cap, as many as you want) and it hands you the power to manually adjust line matching AND directly edit files. Main character energy tbh.
And it doesn't stop there β Diffuse can also pull revisions of files out of Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS and Subversion repositories, for comparison and merging. Vers, we're literally covered. π
π OPTIONS π
π Help Options
Heads up bestie: if you specify a help option, it has to be the only argument on the command line. Diffuse will quit immediately after showing you the help info β like, instantly, no goodbyes.
-h,-?,--helpβ Displays usage information.-v,--versionβ Displays the version number and copyright information.
π§ Configuration Options
Another rule, sorry: if you specify a configuration option, it must be the first argument on the command line. First or nothing, periodt.
--no-rcfileβ Do not read any initialisation files. Zero. None. Skipping them entirely.--rcfilefile β Only read initialisation commands from file.
π₯ General Options
-c,--commitrev β Opens separate file comparison tabs for all files affected by commit rev, from the remaining paths you specified in the command line arguments.-D,--close-if-sameβ Closes all tabs with no differences. If it's the same, it's outta here.-e,--encodingcodec β Uses codec to read and write files.-L,--labellabel β Displays label instead of the file name.-m,--modifiedβ Opens separate file comparison tabs for all modified files from the remaining paths specified in the command line arguments.-r,--revisionrev β Includes revision rev of the next file named in the command line arguments in a file comparison tab.-s,--separateβ Opens all remaining files specified in the command line arguments in separate file comparison tabs.-t,--tabβ Starts a new tab for any remaining files named in the command line arguments.-V,--vcsvcs-list β Searches for version control systems in the ordering: vcs-list.--lineline β Starts with line line selected.--null-fileβ Creates a blank file comparison pane. Empty. A fresh canvas bestie. π¨
π Display Options
The display options you put in the command line arguments will override saved preference values. Your saved prefs are getting overruled, sorry not sorry.
-b,--ignore-space-changeβ Ignores changes to the amount of white space.-B,--ignore-blank-linesβ Ignores changes whose lines are all blank.-E,--ignore-end-of-lineβ Ignores end of line differences.-i,--ignore-caseβ Ignores case differences in file contents.-w,--ignore-all-spaceβ Ignores all white space.
πΈ FILE COMPARISON πΈ
Use the File β New 2-Way File Merge, File β New 3-Way File Merge, and File β New N-Way File Merge menu items to create extra tabs for comparing text files. You can specify file names and revisions either in the command line arguments you used to invoke Diffuse, or in the fields on the Open File dialogue. Either way works, queen. π
Diffuse displays files side-by-side, inserting gaps to align similar lines of text. Differences are highlighted with a different background colour β so you can literally see the drama.
π«Ά Comparison Summary
A summary of the compared files lives in the far right margin. The summary illustrates where gaps have been inserted to align matching lines of text and highlights differences using colour. Manual edits also get highlighted in green. A blue cursor identifies the region currently being viewed, and you can change the viewed region by clicking anywhere on the summary. Click around, it's fun, it's giving navigation.
β Selecting
Lines of text can be selected with the mouse pointer or the keyboard.
Select lines with the mouse pointer by clicking on a line. Click and drag to select multiple lines. Holding down the shift key while clicking will extend the current selection.
Select lines with the keyboard by pressing the page up/down or arrow keys. Extend the current selection by holding down the shift key and pressing the page up/down or arrow keys. Move the selection to an adjacent file using the left and right arrow keys.
π« Matching Lines
The mouse pointer or keyboard can be used to manually align lines of text with adjacent files.
- With the mouse pointer: select a line of text with the left mouse button, right click on a line of text from an adjacent file, and choose Align with Selection.
- With the keyboard: move the selection with the cursor keys, press the space bar to pick the current line of text, move the selection with the cursor keys to a line of text in an adjacent file, and press the space bar to pick the target line of text. Pressing the Escape key will cancel the operation.
Use the Isolate menu item to prevent the selected lines from being matched with any lines from the adjacent files. Sometimes you gotta set boundaries bestie. π«
π Editing
Press the Enter key or double-click on a text area to enter text editing mode. The cursor will change to indicate text editing mode and the status bar at the bottom of the window will display the cursor's column position.
In text editing mode, text can be selected with the mouse pointer by click and dragging. The current selection can be extended by holding down the shift key and moving the cursor by clicking with the mouse pointer or pressing any of the arrow, home, end or page up/down keys. Individual words can be selected by double-clicking on them with the mouse pointer. Whole lines can be selected by triple-clicking on them with the mouse pointer.
Modify text by typing on the keyword. Modified lines will be highlighted in green. Use the Undo and Redo menu items to undo and redo the previously preformed operations.
Press the Escape key or click on another file's text area using the left mouse button to leave editing mode. Exit gracefully, periodt.
π¦ Merging
Use the difference buttons or menu items to navigate between blocks of differences within a file. When navigating, Diffuse will move the selection to the next continuous set of lines with differences or edits.
Use the merge buttons or menu items to copy blocks of text into the selected range of lines. The Undo and Redo menu items can be used to undo and redo the previously preformed operations. All changes to a set of lines can be reverted using the Clear Edits menu item, regardless of the order the edits were performed. Clean slate energy. β¨
π VERSION CONTROL π
Diffuse can retrieve file revisions from several version control systems via their command line interface. The Microsoft Windows build of Diffuse is able to use both the Cygwin and native versions of the supported version control systems. When using Diffuse with Cygwin, make sure Diffuse's Cygwin preferences correctly describe your system. If the Update paths for Cygwin preference exists for a version control system, it must be enabled to use the Cygwin version.
Version control systems are sensitive to the system path and other environment variable settings. The Launch from a Bash login shell preference may be used to easily set the environment for Cygwin version control systems.
π Viewing Uncommitted Modifications
The -m option will cause Diffuse to open comparison tabs for each file the version control system indicates has uncommitted modifications. This is convenient for reviewing all changes before committing or resolving a merge conflict. If no paths are specified, the current working directory will be used. For example, view all of your uncommitted modifications with this command line:
$ diffuse -m
The default revision of a file will be used for comparison if only one file is specified. For example, this will display a 2-way merge between the default revision of foo.C and the local foo.C file:
$ diffuse foo.C
π Specifying Revisions
The -r option may also be used to explicitly specify a particular file revision. Any revision specifier understood by the version control system may be used. The local file will be used for comparison if only one file revision is specified. For example, this will display a 2-way merge between revision 123 of foo.C and the local foo.C file:
$ diffuse -r 123 foo.C
Multiple file revisions can be compared by specifying multiple -r options. For example, this will display a 2-way merge between revision 123 of foo.C and revision 321 of foo.C:
$ diffuse -r 123 -r 321 foo.C
Local files can be mixed with files from the version control system. For example, this will display a 3-way merge between revision MERGE_HEAD of foo.C, the local foo.C file, and revision HEAD of foo.C:
$ diffuse -r MERGE_HEAD foo.C foo.C -r HEAD foo.C
The -c option may be used to easily specify a pair of sequential revisions. For example, this will display a 2-way merge between revision 1.2.2 of foo.C and revision 1.2.3 of foo.C:
$ diffuse -c 1.2.3 foo.C
Diffuse does not limit the number of panes that can be used for comparing files. The inputs to a Git octopus merge could be viewed with a command line like this:
$ diffuse -r HEAD^1 -r HEAD^2 -r HEAD^3 -r HEAD^4 -r HEAD^5 foo.C
π RESOURCES π
Resources can be used to customise several aspects of Diffuse's appearance and behaviour β like changing the colours used in the user interface, customising the keyboard shortcuts, adding or replacing syntax highlighting rules, or changing the mapping from file extensions to syntax highlighting rules. Glow-up capabilities, honestly.
When Diffuse is started, it will read commands from the system wide initialisation file /etc/diffuserc (%INSTALL_DIR%\diffuserc on Microsoft Windows) and then the personal initialisation file ~/.config/diffuse/diffuserc (%HOME%\.config\diffuse\diffuserc on Microsoft Windows). This behaviour can be changed with the --no-rcfile and --rcfile configuration options. A Bourne shell-like lexical analyser is used to parse initialisation commands. Comments and special characters can be embedded using the same style of escaping used in Bourne shell scripts.
π§ General
importfile β Processes initialisation commands from file. Initialisation files will only be processed once.
π Key Bindings
keybindingcontext action key_combination β Binds a key combination to action when used in context. Specify Shift and Control modifiers by prependingShift+andCtrl+to key_combination respectively. Keys normally modified by the Shift key should be specified using their modified value if key_combination involves the Shift key. For example,Ctrl+gandShift+Ctrl+G. Remove bindings for key_combination by specifyingNonefor the action.
π« Menu Item Key Bindings
Use menu for the context to define key bindings for menu items. The following values are valid for action:
open_fileβ okay so bestie, this is literally theFile β Open File...menu item. Default:Ctrl+o. πopen_file_in_new_tabβ theFile β Open File In New Tab...menu item, no cap. Default:Ctrl+t. β¨open_modified_filesβ hits theFile β Open Modified Files...menu item. Default:Shift+Ctrl+O. π¦open_commitβ theFile β Open Commit...menu item. Default:Shift+Ctrl+T. πΈreload_fileβFile β Reload Filemenu item. Default:Shift+Ctrl+R. πsave_fileβ theFile β Save Filemenu item. Default:Ctrl+s. πΎsave_file_asβFile β Save File As...menu item. Default:Shift+Ctrl+A. πsave_allβ theFile β Save Allmenu item. Default:Shift+Ctrl+S. βnew_2_way_file_mergeβFile β New 2-Way File Mergemenu item. Default:Ctrl+2. πnew_3_way_file_mergeβFile β New 3-Way File Mergemenu item. Default:Ctrl+3. πnew_n_way_file_mergeβFile β New N-Way File Mergemenu item. Default:Ctrl+4. πclose_tabβ theFile β Close Tabmenu item. Default:Ctrl+w. βοΈundo_close_tabβFile β Undo Close Tabmenu item. Default:Shift+Ctrl+w. β©οΈquitβFile β Quitmenu item. Default:Ctrl+q. πundoβEdit β Undomenu item. Default:Ctrl+z. πredoβEdit β Redomenu item. Default:Shift+Ctrl+Z. πcutβEdit β Cutmenu item. Default:Ctrl+x. βοΈcopyβEdit β Copymenu item. Default:Ctrl+c. πpasteβEdit β Pastemenu item. Default:Ctrl+v. πselect_allβEdit β Select Allmenu item. Default:Ctrl+a. π«Άclear_editsβEdit β Clear Editsmenu item. Default:Ctrl+r. π§Ήdismiss_all_editsβEdit β Dismiss All Editsmenu item. Default:Ctrl+d. πfindβEdit β Find...menu item. Default:Ctrl+f. πfind_nextβEdit β Find Nextmenu item. Default:Ctrl+g. β‘οΈfind_previousβEdit β Find Previousmenu item. Default:Shift+Ctrl+G. β¬ οΈgo_to_lineβEdit β Go To Line...menu item. Default:Shift+Ctrl+L. πpreferencesβEdit β Preferencesmenu item. Default:None. βοΈno_syntax_highlightingβView β Syntax Highlighting β Nonemenu item. Default:None. π«syntax_highlighting_syntaxβView β Syntax Highlighting β syntaxmenu item. Default:None. π¨realign_allβView β Realign Allmenu item. Default:Ctrl+l. πisolateβView β Isolatemenu item. Default:Ctrl+i. ποΈfirst_differenceβView β First Differencemenu item. Default:Shift+Ctrl+Up. β«previous_differenceβView β Previous Differencemenu item. Default:Ctrl+Up. πΌnext_differenceβView β Next Differencemenu item. Default:Ctrl+Down. π½last_differenceβView β Last Differencemenu item. Default:Shift+Ctrl+Down. β¬first_tabβView β First Tabmenu item. Default:Shift+Ctrl+Page_Up. π₯previous_tabβView β Previous Tabmenu item. Default:Ctrl+Page_Up. β¬οΈnext_tabβView β Next Tabmenu item. Default:Ctrl+Page_Down. β¬οΈlast_tabβView β Last Tabmenu item. Default:Shift+Ctrl+Page_Down. πshift_pane_rightβView β Shift Pane Rightmenu item. Default:Shift+Ctrl+parenleft. β‘οΈshift_pane_leftβView β Shift Pane Leftmenu item. Default:Shift+Ctrl+parenright. β¬ οΈconvert_to_upper_caseβFormat β Convert To Upper Casemenu item. Default:Ctrl+u. πconvert_to_lower_caseβFormat β Convert To Lower Casemenu item. Default:Shift+Ctrl+U. π‘sort_lines_in_ascending_orderβFormat β Sort Lines In Ascending Ordermenu item. Default:Ctrl+y. π’sort_lines_in_descending_orderβFormat β Sort Lines In Descending Ordermenu item. Default:Shift+Ctrl+Y. π£remove_trailing_white_spaceβFormat β Remove Trailing White Spacemenu item. Default:Ctrl+k. π§½convert_tabs_to_spacesβFormat β Convert Tabs To Spacesmenu item. Default:Ctrl+b. β‘οΈconvert_leading_spaces_to_tabsβFormat β Convert Leading Spaces To Tabsmenu item. Default:Shift+Ctrl+B. β¬ οΈincrease_indentingβFormat β Increase Indentingmenu item. Default:Shift+Ctrl+greater. πdecrease_indentingβFormat β Decrease Indentingmenu item. Default:Shift+Ctrl+less. πconvert_to_dosβFormat β Convert To DOS Formatmenu item. Default:Shift+Ctrl+E. πΎconvert_to_macβFormat β Convert To Mac Formatmenu item. Default:Shift+Ctrl+C. πconvert_to_unixβFormat β Convert To Unix Formatmenu item. Default:Ctrl+e. π§copy_selection_rightβMerge β Copy Selection Rightmenu item. Default:Shift+Ctrl+Right. β‘οΈcopy_selection_leftβMerge β Copy Selection Leftmenu item. Default:Shift+Ctrl+Left. β¬ οΈcopy_left_into_selectionβMerge β Copy Left Into Selectionmenu item. Default:Ctrl+Right. πcopy_right_into_selectionβMerge β Copy Right Into Selectionmenu item. Default:Ctrl+Left. πmerge_from_left_then_rightβMerge β Merge From Left Then Rightmenu item. Default:Ctrl+m. πmerge_from_right_then_leftβMerge β Merge From Right Then Leftmenu item. Default:Shift+Ctrl+M. πhelp_contentsβHelp β Help Contentsmenu item. Default:F1. βaboutβHelp β Aboutmenu item. Default:None. βΉοΈ
π Line Editing Mode Key Bindings π
bestie, use line_mode for the context to define key bindings for line editing mode. the following values are valid for action, periodt:
enter_align_modeβ enter alignment editing mode. Default:space. β¨enter_character_modeβ enter character editing mode. Defaults:Return,KP_Enter. πfirst_lineβ move cursor to the first line. Defaults:Home,g. πextend_first_lineβ move cursor to the first line, extending the selection. Default:Shift+Home. β¬οΈlast_lineβ move cursor to the last line. Defaults:End,Shift+G. πextend_last_lineβ move cursor to the last line, extending the selection. Default:Shift+End. β¬οΈupβ move cursor up one line. Defaults:Up,k. β¬οΈextend_upβ move cursor up one line, extending the selection. Defaults:Shift+Up,Shift+K. πΌdownβ move cursor down one line. Defaults:Down,j. β¬οΈextend_downβ move cursor down one line, extending the selection. Defaults:Shift+Down,Shift+J. π½leftβ move cursor left one file. Defaults:Left,h. β¬ οΈextend_leftβ move cursor left one file, extending the selection. Default:Shift+Left. πrightβ move cursor right one file. Defaults:Right,l. β‘οΈextend_rightβ move cursor right one file, extending the selection. Default:Shift+Right. πpage_upβ move cursor up one page. Defaults:Page_Up,Ctrl+u. πextend_page_upβ move cursor up one page, extending the selection. Defaults:Shift+Page_Up,Shift+Ctrl+u. πpage_downβ move cursor down one page. Defaults:Page_Down,Ctrl+d. πextend_page_downβ move cursor down one page, extending the selection. Defaults:Shift+Page_Down,Shift+Ctrl+d. πdelete_textβ delete the selected text. Defaults:BackSpace,Delete,x. ποΈfirst_differenceβ select the first difference. Defaults:Ctrl+Home,Shift+P. π₯previous_differenceβ select the previous difference. Default:p. πΌnext_differenceβ select the next difference. Default:n. π½last_differenceβ select the last difference. Defaults:Ctrl+End,Shift+N. πclear_editsβ clear all edits from the selected lines. Default:r. π§Ήcopy_selection_leftβ copy lines from the selection into the file on the left. Default:None. β¬ οΈcopy_selection_rightβ copy lines from the selection into the file on the right. Default:None. β‘οΈcopy_left_into_selectionβ copy lines from the file on the left into the selection. Default:Shift+L. πcopy_right_into_selectionβ copy lines from the file on the right into the selection. Default:Shift+H. πmerge_from_left_then_rightβ merge lines from file on the left then file on the right. Default:m. πmerge_from_right_then_leftβ merge lines from file on the right then file on the left. Default:Shift+M. πisolateβ isolate the selected lines. Default:i. ποΈ
β¨ Alignment Editing Mode Key Bindings β¨
use align_mode for the context to define key bindings for alignment editing mode. these are the valid values for action:
enter_line_modeβ enter line editing mode. Default:Escape. πͺenter_character_modeβ enter character editing mode. Defaults:Return,KP_Enter. πfirst_lineβ move cursor to the first line. Default:g. πlast_lineβ move cursor to the last line. Default:Shift+G. πupβ move cursor up one line. Defaults:Up,k. β¬οΈdownβ move cursor down one line. Defaults:Down,j. β¬οΈleftβ move cursor left one file. Defaults:Left,h. β¬ οΈrightβ move cursor right one file. Defaults:Right,l. β‘οΈpage_upβ move cursor up one page. Defaults:Page_Up,Ctrl+u. πpage_downβ move cursor down one page. π
Defaults: Page_Down, Ctrl+d β that's just the tail end of the last action's bullet from before, bestie, we're still deep in key-binding territory π
alignβ slides the line you picked so it lines up with wherever your cursor is sitting. It's giving "make it match, make it cute". Default:space
π Character Editing Mode Key Bindings π
okay so when you're living in character editing mode, you set up your keys with the character_mode context. Here's what you can pass as action:
enter_line_modeβ bounces you into line editing mode. Default:Escape
πΈ Strings πΈ
string name valueβ declares a string resource called name whose value is value. That's it, that's the whole vibe.
β¨ Used String Resources β¨
These are the string resources Diffuse actually reaches for:
difference_coloursβ a list of colour resources used to flag differences. Default:difference_1 difference_2 difference_3
π¨ Colours π¨
[ colour | color ] name red green blueβ declares a colour resource called name. Each individual colour component gets written as a value between0and1. Yes,colourandcolorboth work β Diffuse said "spelling is a construct" π«Ά
π Used Colour Resources π
Here's every colour resource Diffuse uses, no gatekeeping:
alignmentβ colour used to indicate a line picked for manual alignment. Default:1 1 0character_selectionβ colour used to indicate selected characters. Default:0.7 0.7 1cursorβ colour used for the cursor. Default:0 0 0difference_1β colour used to identify differences between the first pair of files. Default:1 0.625 0.625difference_2β colour used to identify differences between the second pair of files. Default:0.85 0.625 0.775difference_3β colour used to identify differences between the third pair of files. Default:0.85 0.775 0.625editedβ colour used to indicate edited lines. Default:0.5 1 0.5hatchβ colour used for indicating alignment gaps. Default:0.8 0.8 0.8line_numberβ colour used for line numbers. Default:0 0 0line_number_backgroundβ background colour for the line number area. Default:0.75 0.75 0.75line_selectionβ colour used to indicate selected lines. Default:0.7 0.7 1map_backgroundβ background colour for the map area. Default:0.6 0.6 0.6marginβ colour used to indicate the right margin. Default:0.8 0.8 0.8preeditβ pre-edit text colour. Default:0 0 0textβ regular text colour. Default:0 0 0text_backgroundβ background colour for the text area. Default:1 1 1
π¦ Floating Point Values π¦
float name valueβ declares a floating point resource called name whose value is value.
β Used Floating Point Resources β
The float resources Diffuse uses:
alignment_opacityβ opacity used when compositing the manual alignment colour. Defaults:1character_difference_opacityβ opacity used when compositing character difference colours. Defaults:0.4character_selection_opacityβ opacity used when compositing the character selection colour. Defaults:0.4edited_opacityβ opacity used when compositing the edited line colour. Defaults:0.4line_difference_opacityβ opacity used when compositing line difference colours. Defaults:0.3line_selection_opacityβ opacity used when compositing the line selection colour. Defaults:0.4
π Syntax Highlighting π
this is the main character of the config file, ngl. pay attention bestie π
syntax name [initial_state default_tag]β declares a brand new syntax style called name. Syntax highlighting runs on a simple state machine that transitions between states whenever certain patterns get matched. The starting state for that machine is initial_state. Any characters that no pattern matches get tagged as default_tag for highlighting. Wanna delete the syntax style called name? Just leave outinitial_stateanddefault_tag. Gone. Blocked. πsyntax_files name [pattern]β says that files whose name matches pattern should be highlighted with the syntax style called name. Wanna remove patterns used to match files for the syntax style called name? Omit pattern.syntax_magic name [pattern [ignorecase]]β says that files whose first line matches pattern should be highlighted with the syntax style called name. Wanna remove patterns used to match files for the syntax style called name? Omit pattern.syntax_pattern name initial_state final_state tag pattern [ignorecase]β adds a pattern to the syntax style you declared just before this. Patterns get tried one at a time, in the order they were declared, until the first match is found β first come, first served, no cutting the line. A pattern only gets used to match characters when the state machine is sitting in the state initial_state. If the pattern defined by pattern matches, the state machine transitions to final_state. Case insensitive pattern matching kicks in if ignorecase is specified. Every character matched by the pattern gets tagged as tag for highlighting.
π FILES π
These are the files Diffuse uses:
/etc/diffusercβ system wide initialisations (%INSTALL_DIR%\diffusercon Microsoft Windows)/usr/share/diffuse/syntax/*.syntaxβ syntax files for various languages (%INSTALL_DIR%\syntax\*.syntaxon Microsoft Windows)~/.config/diffuse/diffusercβ your initialisations (%HOME%\.config\diffuse\diffusercon Microsoft Windows)~/.config/diffuse/prefsβ your saved preferences (%HOME%\.config\diffuse\prefson Microsoft Windows)~/.local/share/diffuse/stateβ data persistent across sessions (%HOME%\.local\share\diffuse\stateon Microsoft Windows)
π AUTHOR π
Diffuse was written by Derrick Moser <derrick_moser@yahoo.com>.
Β© 2006-2014 Derrick Moser. All Rights Reserved.
π COPYING π
Diffuse is free software; you may redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the licence, or (at your option) any later version.
and that's the whole page bestie, you made it to the end π«Ά this was diffuse version 0.4.8, dated 2014-07-18, and honestly? iconic. go diff some files. periodt π
β¨
π¦ where this page comes from
- arch rolling: diffuse 0.11.0-1 Β· GPL
- debian trixie: diffuse 0.9.0-1 Β· GPL-2.0-or-later
- fedora 43: diffuse 0.10.0-2.fc43 Β· GPL-2.0-or-later
- fedora 43: diffuse 0.11.0-2.fc43 Β· GPL-2.0-or-later
- fedora 44: diffuse 0.10.0-2.fc43 Β· GPL-2.0-or-later
- fedora 44: diffuse 0.11.0-2.fc44 Β· GPL-2.0-or-later
- nixos 26.05: diffuse 0.11.0
- nixpkgs unstable: diffuse 0.11.0
- ubuntu questing: diffuse 0.9.0-1
- ubuntu resolute: diffuse 0.10.0-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms