Categorygithub.com/mkchoi212/fac
modulepackage
2.0.0+incompatible
Repository: https://github.com/mkchoi212/fac.git
Documentation: pkg.go.dev

# README


Easy-to-use CUI for fixing git conflicts


I never really liked any of the mergetools out there so I made a program that is somewhat easier to use.

Preview

👷 Installation

Execute:

$ go get github.com/mkchoi212/fac

Or using Homebrew 🍺

brew tap mkchoi212/fac https://github.com/mkchoi212/fac.git
brew install fac

🔧 Using

fac operates much like git add -p . It has a prompt input at the bottom of the screen where the user inputs various commands.

The commands have been preset to the following specifications

w - show more lines up
s - show more lines down
a - use local version
d - use incoming version
e - manually edit code

j - scroll down
k - scroll up

v - [v]iew orientation
n - [n]ext conflict
p - [p]revious conflict

h | ? - [h]elp
q | Ctrl+c - [q]uit

[w,a,s,d,?] >> [INPUT HERE]

⚙️ Customization

The above key-bindings and various behaviors can be altered by creating a .fac.yml file in your home directory. Please refer to the configuration README.md for more information.

✋ Contributing

This is an open source project so feel free to contribute by

👮 License

See License

# Packages

# Functions

Evaluate evalutes the user's input character by character It returns `ErrUnknownCmd` if the string contains an invalid command It also returns `ErrNeedRefresh` if user uses `e` command to open vim.
Move goes to the next conflict in the list in the provided `direction`.
ParseFlags parses flags provided by the user.
ParseInput is invoked when the user presses "Enter" It `evaluate`s the user's query and reflects the state on the UI.
PrintHelp prints the current key binding rules in the side panel.
PrintPrompt prints the promptString on the bottom left corner of the screen Note that the prompt is composed of two separate views, one that displays just the promptString, and another that takes input from the user.
PrintSummary prints the summary of the fac session after the user either quits the program or has resolved all conflicts.
PromptEditor handles user's interaction with the prompt Note that user's `ContinuousEvaluation` setting value changes its behavior.
Resolve resolves the provided conflict and moves to the next conflict in the queue.
Scroll scrolls the two code view panels in `direction` by one line.
Select selects conflict `c` as the current conflict displayed on the screen When selecting a conflict, it updates the side panel, and the code view.

# Constants

Following constants define the string literal names of 5 views that are instantiated via gocui.
`Up` and `Down` represent scrolling directions `Horizontal` and `Vertical` represent current code view orientation Notice how both pairs of directionality are `not`s of each other.
Following constants define the string literal names of 5 views that are instantiated via gocui.
`Up` and `Down` represent scrolling directions `Horizontal` and `Vertical` represent current code view orientation Notice how both pairs of directionality are `not`s of each other.
Following constants define the string literal names of 5 views that are instantiated via gocui.
Following constants define the string literal names of 5 views that are instantiated via gocui.
Following constants define the string literal names of 5 views that are instantiated via gocui.
`Up` and `Down` represent scrolling directions `Horizontal` and `Vertical` represent current code view orientation Notice how both pairs of directionality are `not`s of each other.
`Up` and `Down` represent scrolling directions `Horizontal` and `Vertical` represent current code view orientation Notice how both pairs of directionality are `not`s of each other.

# Variables

ErrOpenEditor is returned when the user wants to open an editor Note that the current instance of gocui must be destroyed before opening an editor.
ErrUnknownCmd is returned when user inputs an invalid character.