Add aliases to git and themes to vim

This commit is contained in:
iFargle 2023-07-01 20:14:29 +09:00
parent bde5678e09
commit db2701dbed
3 changed files with 140 additions and 7 deletions

View file

@ -6,12 +6,17 @@
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
shellAliases = { shellAliases = {
# docker
d = "docker"; d = "docker";
dc = "docker-compose"; dc = "docker-compose";
de = "docker exec -it"; de = "docker exec -it";
ddate = "date +%Y.%m.%d";
dday = "date +%A"; # bash / system
cp = "rsync -avr"; cp = "rsync -avr";
ll = "ls -lah";
rm = "rm -i";
# git
g = "git"; g = "git";
ga = "git add -A"; ga = "git add -A";
gb = "git branch"; gb = "git branch";
@ -22,12 +27,15 @@
gp = "git pull --prune"; gp = "git pull --prune";
gpu = "git push origin HEAD"; gpu = "git push origin HEAD";
gs = "git status -sb"; gs = "git status -sb";
hs = "home-manager switch";
ll = "ls -lah"; # time / date
rm = "rm -i";
tdate = "date +%Y.%m.%d..%H.%M"; tdate = "date +%Y.%m.%d..%H.%M";
ttime = "date +%H.%M"; ttime = "date +%H.%M";
ddate = "date +%Y.%m.%d";
dday = "date +%A";
# nixos-rebuild
nr = "nixos-rebuild"; nr = "nixos-rebuild";
nrs = "nixos-rebuild switch"
}; };
}; };
}; };

View file

@ -5,6 +5,131 @@
userEmail = "albert@sysctl.io"; userEmail = "albert@sysctl.io";
extraConfig = { extraConfig = {
credential.helper = "cache --timeout=25920000"; credential.helper = "cache --timeout=25920000";
alias.a = "add --all";
alias.ai = "add -i";
alias.ap = "apply";
alias.as = "apply --stat";
alias.ac = "apply --check";
alias.ama = "am --abort";
alias.amr = "am --resolved";
alias.ams = "am --skip";
alias.b = "branch";
alias.ba = "branch -a";
alias.bd = "branch -d";
alias.bdd = "branch -D";
alias.br = "branch -r";
alias.bc = "rev-parse --abbrev-ref HEAD";
alias.c = "commit";
alias.ca = "commit -a";
alias.cm = "commit -m";
alias.cam = "commit -am";
alias.cem = "commit --allow-empty -m";
alias.cd = "commit --amend";
alias.cad = "commit -a --amend";
alias.ced = "commit --allow-empty --amend";
alias.cl = "clone";
alias.cld = "clone --depth 1";
alias.cp = "cherry-pick";
alias.cpa = "cherry-pick --abort";
alias.cpc = "cherry-pick --continue";
alias.d = "diff";
alias.dp = "diff --patience";
alias.dc = "diff --cached";
alias.dk = "diff --check";
alias.dck = "diff --cached --check";
alias.dt = "difftool";
alias.dct = "difftool --cached";
alias.f = "fetch";
alias.fo = "fetch origin";
alias.fu = "fetch upstream";
alias.fp = "format-patch";
alias.fk = "fsck";
alias.g = "grep -p";
alias.l = "log --oneline";
alias.lg = "log --oneline --graph --decorate";
alias.ls = "ls-files";
alias.lsf = "!git ls-files | grep -i";
alias.m = "merge";
alias.ma = "merge --abort";
alias.mc = "merge --continue";
alias.ms = "merge --skip";
alias.o = "checkout";
alias.ob = "checkout -b";
alias.pr = "prune -v";
alias.ps = "push";
alias.psf = "push -f";
alias.psu = "push -u";
alias.pst = "push --tags";
alias.pso = "push origin";
alias.psao = "push --all origin";
alias.psfo = "push -f origin";
alias.psuo = "push -u origin";
alias.psom = "push origin master";
alias.psaom = "push --all origin master";
alias.psfom = "push -f origin master";
alias.psuom = "push -u origin master";
alias.psoc = "!git push origin $(git bc)";
alias.psaoc = "!git push --all origin $(git bc)";
alias.psfoc = "!git push -f origin $(git bc)";
alias.psuoc = "!git push -u origin $(git bc)";
alias.psdc = "!git push origin :$(git bc)";
alias.pl = "pull";
alias.pb = "pull --rebase";
alias.plo = "pull origin";
alias.pbo = "pull --rebase origin";
alias.plom = "pull origin master";
alias.ploc = "!git pull origin $(git bc)";
alias.pbom = "pull --rebase origin master";
alias.pboc = "!git pull --rebase origin $(git bc)";
alias.plu = "pull upstream";
alias.plum = "pull upstream master";
alias.pluc = "!git pull upstream $(git bc)";
alias.pbum = "pull --rebase upstream master";
alias.pbuc = "!git pull --rebase upstream $(git bc)";
alias.rb = "rebase";
alias.rba = "rebase --abort";
alias.rbc = "rebase --continue";
alias.rbi = "rebase --interactive";
alias.rbs = "rebase --skip";
alias.re = "reset";
alias.rh = "reset HEAD";
alias.reh = "reset --hard";
alias.rem = "reset --mixed";
alias.res = "reset --soft";
alias.rehh = "reset --hard HEAD";
alias.remh = "reset --mixed HEAD";
alias.resh = "reset --soft HEAD";
alias.r = "remote";
alias.ra = "remote add";
alias.rr = "remote rm";
alias.rv = "remote -v";
alias.rn = "remote rename";
alias.rp = "remote prune";
alias.rs = "remote show";
alias.rao = "remote add origin";
alias.rau = "remote add upstream";
alias.rro = "remote remove origin";
alias.rru = "remote remove upstream";
alias.rso = "remote show origin";
alias.rsu = "remote show upstream";
alias.rpo = "remote prune origin";
alias.rpu = "remote prune upstream";
alias.rmf = "rm -f";
alias.rmrf = "rm -r -f";
alias.s = "status";
alias.sb = "status -s -b";
alias.sa = "stash apply";
alias.sc = "stash clear";
alias.sd = "stash drop";
alias.sl = "stash list";
alias.sp = "stash pop";
alias.ss = "stash save";
alias.sw = "stash show";
alias.t = "tag";
alias.td = "tag -d";
alias.w = "show";
alias.wp = "show -p";
alias.wr = "show -p --no-color";
}; };
}; };
} }

View file

@ -5,10 +5,10 @@
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
vim-airline vim-airline
vim-airline-themes vim-airline-themes
tabnine dracula-vim
tabnine-vim
nerdtree nerdtree
rainbow rainbow
dracula-vim
]; ];
settings = { ignorecase = true; }; settings = { ignorecase = true; };
extraConfig = '' extraConfig = ''