.. highlight:: conf

.. default-domain:: conf


.. _conf-kitten-diff-diff:

Diffing
^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. opt:: kitten-diff.syntax_aliases
.. code-block:: conf

    syntax_aliases pyj:py pyi:py recipe:py

File extension aliases for syntax highlight
For example, to syntax highlight :file:`file.xyz` as
:file:`file.abc` use a setting of :code:`xyz:abc`

.. opt:: kitten-diff.num_context_lines
.. code-block:: conf

    num_context_lines 3

The number of lines of context to show around each change.

.. opt:: kitten-diff.diff_cmd
.. code-block:: conf

    diff_cmd auto

The diff command to use. Must contain the placeholder :code:`_CONTEXT_`
which will be replaced by the number of lines of context. The default
is to search the system for either git or diff and use that, if found.

.. opt:: kitten-diff.replace_tab_by
.. code-block:: conf

    replace_tab_by \x20\x20\x20\x20

The string to replace tabs with. Default is to use four spaces.


.. _conf-kitten-diff-colors:

Colors
^^^^^^^^^^^^^^^^^^^^^^^^^^

.. opt:: kitten-diff.pygments_style
.. code-block:: conf

    pygments_style default

The pygments color scheme to use for syntax highlighting.
See :link:`pygments colors schemes <https://help.farbox.com/pygments.html>` for a list of schemes.

.. opt:: kitten-diff.foreground, kitten-diff.background
.. code-block:: conf

    foreground black
    background white

Basic colors

.. opt:: kitten-diff.title_fg, kitten-diff.title_bg
.. code-block:: conf

    title_fg black
    title_bg white

Title colors

.. opt:: kitten-diff.margin_bg, kitten-diff.margin_fg
.. code-block:: conf

    margin_bg #fafbfc
    margin_fg #aaaaaa

Margin colors

.. opt:: kitten-diff.removed_bg, kitten-diff.highlight_removed_bg, kitten-diff.removed_margin_bg
.. code-block:: conf

    removed_bg           #ffeef0
    highlight_removed_bg #fdb8c0
    removed_margin_bg    #ffdce0

Removed text backgrounds

.. opt:: kitten-diff.added_bg, kitten-diff.highlight_added_bg, kitten-diff.added_margin_bg
.. code-block:: conf

    added_bg           #e6ffed
    highlight_added_bg #acf2bd
    added_margin_bg    #cdffd8

Added text backgrounds

.. opt:: kitten-diff.filler_bg
.. code-block:: conf

    filler_bg #fafbfc

Filler (empty) line background

.. opt:: kitten-diff.margin_filler_bg
.. code-block:: conf

    margin_filler_bg none

Filler (empty) line background in margins, defaults to the filler background

.. opt:: kitten-diff.hunk_margin_bg, kitten-diff.hunk_bg
.. code-block:: conf

    hunk_margin_bg #dbedff
    hunk_bg        #f1f8ff

Hunk header colors

.. opt:: kitten-diff.search_bg, kitten-diff.search_fg, kitten-diff.select_bg, kitten-diff.select_fg
.. code-block:: conf

    search_bg #444
    search_fg white
    select_bg #b4d5fe
    select_fg black

Highlighting


.. _conf-kitten-diff-shortcuts:

Keyboard shortcuts
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. shortcut:: kitten-diff.Quit
.. code-block:: conf

    map q quit
    map esc quit

.. shortcut:: kitten-diff.Scroll down
.. code-block:: conf

    map j scroll_by 1
    map down scroll_by 1

.. shortcut:: kitten-diff.Scroll up
.. code-block:: conf

    map k scroll_by -1
    map up scroll_by -1

.. shortcut:: kitten-diff.Scroll to top
.. code-block:: conf

    map home scroll_to start

.. shortcut:: kitten-diff.Scroll to bottom
.. code-block:: conf

    map end scroll_to end

.. shortcut:: kitten-diff.Scroll to next page
.. code-block:: conf

    map page_down scroll_to next-page
    map space scroll_to next-page

.. shortcut:: kitten-diff.Scroll to previous page
.. code-block:: conf

    map page_up scroll_to prev-page

.. shortcut:: kitten-diff.Scroll to next change
.. code-block:: conf

    map n scroll_to next-change

.. shortcut:: kitten-diff.Scroll to previous change
.. code-block:: conf

    map p scroll_to prev-change

.. shortcut:: kitten-diff.Show all context
.. code-block:: conf

    map a change_context all

.. shortcut:: kitten-diff.Show default context
.. code-block:: conf

    map = change_context default

.. shortcut:: kitten-diff.Increase context
.. code-block:: conf

    map + change_context 5

.. shortcut:: kitten-diff.Decrease context
.. code-block:: conf

    map - change_context -5

.. shortcut:: kitten-diff.Search forward
.. code-block:: conf

    map / start_search regex forward

.. shortcut:: kitten-diff.Search backward
.. code-block:: conf

    map ? start_search regex backward

.. shortcut:: kitten-diff.Scroll to next search match
.. code-block:: conf

    map . scroll_to next-match
    map > scroll_to next-match

.. shortcut:: kitten-diff.Scroll to previous search match
.. code-block:: conf

    map , scroll_to prev-match
    map < scroll_to prev-match

.. shortcut:: kitten-diff.Search forward (no regex)
.. code-block:: conf

    map f start_search substring forward

.. shortcut:: kitten-diff.Search backward (no regex)
.. code-block:: conf

    map b start_search substring backward
