<page xmlns="http://projectmallard.org/1.0/"
      type="topic"
      id="file-mode">
<info>
  <title type="sort">1</title>
  <link type="guide" xref="index#file-mode"/>
  <link type="seealso" xref="file-changes"/>
  <revision docversion="1.6" status="draft"/>
  <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
  <credit type="author copyright">
    <name>Kai Willadsen</name>
    <email>kai.willadsen@gmail.com</email>
    <years>2012</years>
  </credit>
</info>

<title>Getting started comparing files</title>

<p>
<app>Meld</app> lets you compare two or three text files side-by-side. You can
start a new file comparison using the new comparison button on the toolbar.
</p>

<p>
Once you've selected your files, <app>Meld</app> will show them side-by-side.
Differences between the files will be highlighted to make individual changes
easier to see. Editing the files will cause the comparison to update
on-the-fly. For details on navigating between individual changes, and on
how to use change-based editing, see <link xref="file-changes"/>.
</p>

<section id="file-mode-overview">
<title><app>Meld</app>'s file comparisons</title>

<p>
There are several different parts to a file comparison. The most important
parts are the editors where your files appear. In addition to these editors,
the areas around and between your files give you a visual overview and actions
to help you handle changes between the files.
</p>
<p>
On the right-hand side of the window, there are small vertical
bars showing various colored blocks. These bars are designed to give you an
overview of all of the differences between your files. Each colored block
represents a section that is inserted, deleted, changed or in conflict between
your files, depending on the block's color used.
</p>
<p>
In between each pair of files is a segment that shows how the changed sections
between your files correspond to each other. You can click on the arrows in a
segment to replace sections in one file with sections from the other. You can
also delete, copy or merge changes. For details on what you can do with
individual change segments, see <link xref="file-changes#change-actions"/>.
</p>

</section>


<section id="file-mode-saving">
<title>Saving your changes</title>

<p>
Once you've finished editing your files, you need to save each file you've
changed.
</p>
<p>
You can tell whether your files have been saved since they last changed by
the save icon that appears next to the file name above each file. Also, if you
have multiple comparisons open, their
notebook labels will show an asterisk (<code>*</code>) after any file that
hasn't been saved.
</p>
<p>
You can save the current file by selecting the save button above the file being
compared, or using the <keyseq><key>Ctrl</key><key>S</key></keyseq> keyboard
shortcut.
</p>
<note>
  <p>
    Saving only saves the <em>currently focused</em> file, which is the file
    containing the cursor. If you can't tell which file is focused, you can
    click on the file to focus it before saving.
  </p>
</note>

</section>

</page>
