cleanup git aliases and switch to delta for diffs

This commit is contained in:
Salar Rahmanian 2024-11-09 21:15:31 -08:00
parent a5bbdd636c
commit 52ae41a79b
2 changed files with 24 additions and 14 deletions

View file

@ -48,7 +48,6 @@
fishPlugins.foreign-env
fishPlugins.bobthefish
font-awesome
gitAndTools.diff-so-fancy
gnupg
go
graphviz
@ -259,11 +258,6 @@
pj = "python -m json.tool";
l = "ll";
g = "git";
gl = "git log";
gc = "git commit -m";
gca = "git commit -am";
gws = "git status";
gu = "gitui";
ghauth = "gh auth login --with-token < ~/.ghauth";
gitpurgemain = ''git branch --merged | grep -v "\*" | grep -v "main" | xargs -n 1 git branch -d'';
gitpurgemaster = ''git branch --merged | grep -v "\*" | grep -v "master" | xargs -n 1 git branch -d'';
@ -281,7 +275,6 @@
nixupgrade = "nix upgrade-nix";
rmxcodederived = "rm -fr ~/Library/Developer/Xcode/DerivedData";
v = "nvim";
wezk = "wezterm show-keys --lua";
sshhcloud1 = "ssh salar@hcloud1.softinio.net";
sshhcloud1r = "ssh root@hcloud1.softinio.net";
};

View file

@ -4,9 +4,26 @@ let
gitConfig = {
core = {
editor = "nvim";
pager = "diff-so-fancy | less --tabs=4 -RFX";
pager = "delta";
};
delta = {
"line-numbers" = true;
"hyperlinks" = true;
"side-by-side" = true;
};
diff = {
colorMoved = "default";
tool = "nvim";
};
difftool.nvim = {
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\"";
prompt = false;
};
fetch.prune = true;
init.defaultBranch = "main";
interactive = {
diffFilter = "delta --color-only";
};
merge.conflictstyle = "diff3";
merge.tool = "nvim";
mergetool.nvim = {
@ -14,26 +31,26 @@ let
prompt = false;
keepBackup = false;
};
diff.tool = "nvim";
difftool.nvim = {
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\"";
prompt = false;
};
# url = {
# "git@github.com:" = {
# insteadOf = "https://github.com/";
# };
# };
fetch.prune = true;
pull = {
rebase = true;
};
};
myAliases = {
ci = "commit";
cim = "commit -m";
cia = "commit -am";
co = "checkout";
cob = "checkout -b";
di = "diff";
gpo = "push origin";
main = "checkout main";
master = "checkout master";
st = "status";
};
myIgnores = [
"*~"