markdown · 1454 bytes Raw Blame History

fit

(noun) : something clever never

A terminal-based merge conflict resolver with a three-pane TUI interface, written in Modern Fortran.

Features

  • Three-Pane Layout: Visual side-by-side comparison similar to VS Code's merge conflict UI

    • Left pane: Incoming changes (from remote/HEAD)
    • Right pane: Local changes (current branch)
    • Bottom pane: Live preview of your resolution choice
  • Color-Coded Diffs:

    • Green + for incoming additions
    • Red - for local changes
    • Clear visual distinction between versions
  • Sequential Navigation: Navigate through multiple conflicts with keyboard shortcuts

  • Interactive Resolution: Choose incoming, local, or both changes for each conflict

Installation

Prerequisites

Build

fpm build

Install

fpm install

Usage

fit <file-with-conflicts>

Example:

fit myfile.txt

Keyboard Controls

Key Action
i Select incoming changes (from remote/HEAD)
l Select local changes (current branch)
b Select both changes (incoming then local)
n / / Navigate to next conflict
p / / Navigate to previous conflict
s Save resolved file and quit
q / ESC Quit without saving
View source
1 # fit
2 (noun) : something clever never
3
4 A terminal-based merge conflict resolver with a three-pane TUI interface, written in Modern Fortran.
5
6 ## Features
7
8 - **Three-Pane Layout**: Visual side-by-side comparison similar to VS Code's merge conflict UI
9 - Left pane: Incoming changes (from remote/HEAD)
10 - Right pane: Local changes (current branch)
11 - Bottom pane: Live preview of your resolution choice
12
13 - **Color-Coded Diffs**:
14 - Green `+` for incoming additions
15 - Red `-` for local changes
16 - Clear visual distinction between versions
17
18 - **Sequential Navigation**: Navigate through multiple conflicts with keyboard shortcuts
19
20 - **Interactive Resolution**: Choose incoming, local, or both changes for each conflict
21
22 ## Installation
23
24 ### Prerequisites
25 - [Fortran Package Manager (fpm)](https://fpm.fortran-lang.org/)
26 - A modern Fortran compiler (gfortran, ifort, etc.)
27
28 ### Build
29 ```bash
30 fpm build
31 ```
32
33 ### Install
34 ```bash
35 fpm install
36 ```
37
38 ## Usage
39
40 ```bash
41 fit <file-with-conflicts>
42 ```
43
44 Example:
45 ```bash
46 fit myfile.txt
47 ```
48
49 ## Keyboard Controls
50
51 | Key | Action |
52 |-----|--------|
53 | `i` | Select **incoming** changes (from remote/HEAD) |
54 | `l` | Select **local** changes (current branch) |
55 | `b` | Select **both** changes (incoming then local) |
56 | `n` / `→` / `↓` | Navigate to **next** conflict |
57 | `p` / `←` / `↑` | Navigate to **previous** conflict |
58 | `s` | **Save** resolved file and quit |
59 | `q` / `ESC` | **Quit** without saving |