From: Jannik ZANDER Date: Sun, 15 May 2016 16:13:31 +0000 (+0200) Subject: Cleanup .gitconfig X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=cbcde4861060c43e50137580573acb83d3b92922;p=dotfiles.git Cleanup .gitconfig --- diff --git a/.bash/aliases b/.bash/aliases index 2eff3b2..fc98959 100644 --- a/.bash/aliases +++ b/.bash/aliases @@ -23,7 +23,6 @@ alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' - alias info='info --vi-keys' #alias less='less -rX' # raw control characters, don't clear the screen after quitting alias whence='type -a' # where, of a sort @@ -34,8 +33,7 @@ alias fgrep='fgrep --color=auto' # show differences in color # Shortcuts alias h="history" alias j="jobs" -alias gg="global -grx" - +alias gx="global -gxr" LS_COMMON="-hF" #LS_COMMON="$LS_COMMON -I NTUSER.\* -I ntuser.\*" @@ -98,3 +96,5 @@ alias sumatra='startSumatra.sh' alias lynx='lynx -use_mouse' alias startvnc='vncserver -geometry 1870x980 -depth 24' alias startvnc4='vnc4server -geometry 1870x980 -depth 24' +alias python='/usr/local/bin/python3' + diff --git a/.gitconfig b/.gitconfig index 5aac0f9..0788a95 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,66 +1,9 @@ -[init] - templatedir = ~/.git_template -[branch] - autosetupmerge = always - autosetuprebase = always -[core] - excludesfile = ~/.gitignore_global - whitespace = space-before-tab,-indent-with-non-tab,trailing-space - editor = git-editor.sh -# pager = less -S -[color] - ui = auto - diff = auto - status = auto - branch = auto - interactive = auto - grep = auto -[color "branch"] - current = yellow reverse - local = yellow - remote = green -[color "diff"] - meta = yellow bold - frag = magenta bold # line info - old = red # deletions - new = green # additions -[color "status"] - added = yellow - changed = green - untracked = cyan -[github] - user = jannikz -[interactive] - singlekey = true -[help] - autocorrect = 10 -[diff] - tool = git-difftool - renames = copies - prompt = false -[difftool "git-difftool"] - cmd = git-difftool.sh $LOCAL $REMOTE -[merge] - summary = true - tool = git-mergetool -[mergetool "git-mergetool"] - cmd = git-mergetool.sh $LOCAL $REMOTE $BASE $MERGED -[pull] - rebase = true -[push] - default = tracking -[rebase] - autosquash = true -[apply] - # Detect whitespace errors when applying a patch - whitespace = fix [alias] co = checkout ci = commit -v st = status br = branch cl = clone --recursive - hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short type = cat-file -t dump = cat-file -p cobr = checkout -b @@ -71,13 +14,17 @@ dc = diff --cached who = shortlog -s -- ed = config --global -e - ls = log --oneline ca = commit -va caa = commit -va --amend -C HEAD + go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" + reb = "!r() { git rebase -i HEAD~$1; }; r" uncommit = reset --soft HEAD~1 rmcommit = reset --hard HEAD~1 - unstage = reset HEAD -- + unstage = reset HEAD -- + discard = checkout -- last = log -1 HEAD + ls = log --oneline + hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short # View abbreviated SHA, description, and history graphs lg = !"git lg1" lg1 = !"git lg1-specific --all" @@ -86,26 +33,17 @@ lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' - # View the current working tree status using the short format # Show the diff between the latest commit and the current state d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" # `git di $number` shows the diff between the state `$number` revisions ago and the current state di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" diffall = !sh git-diffall.sh - # Pull in remote changes for the current repository and all its submodules - p = !"git pull; git submodule foreach git pull origin master" - # Clone a repository including all submodules - # Switch to a branch, creating it if necessary - go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" # Show verbose output about tags, branches or remotes tags = tag -l branches = branch -a remotes = remote -v - # Amend the currently staged files to the latest commit # Credit an author on the latest commit credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f" - # Interactive rebase with the given number of latest commits - reb = "!r() { git rebase -i HEAD~$1; }; r" # Find branches containing commit fb = "!f() { git branch -a --contains $1; }; f" # Find tags containing commit @@ -123,8 +61,54 @@ ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags" gtags = "!sh -c '[ -f .git/hooks/gtags ] || git init; .git/hooks/gtags' git-gtags" cscope = "!sh -c '[ -f .git/hooks/cscope ] || git init; .git/hooks/cscope' git-cscope" - k = !gitk - [include] - # Local/private config goes in the include + k = !gitk +[color] + ui = auto + diff = auto + status = auto + branch = auto + interactive = auto + grep = auto +[color "branch"] + current = yellow reverse + local = yellow + remote = green +[color "diff"] + meta = yellow bold + frag = magenta bold # line info + old = red # deletions + new = green # additions +[color "status"] + added = yellow + changed = green + untracked = cyan +[github] + user = jannikz +[branch] + autosetupmerge = always + autosetuprebase = always +[interactive] + singlekey = true +[help] + autocorrect = 10 +[diff] + renames = copies + prompt = false +[merge] + summary = true +[pull] + rebase = true +[push] + default = tracking +[rebase] + autosquash = true +[apply] + whitespace = fix +[include] path = ~/.gitconfig_local - +[init] + templatedir = ~/.git_template +[core] + excludesfile = ~/.gitignore_global + whitespace = space-before-tab,-indent-with-non-tab,trailing-space +# pager = less -S diff --git a/.vimrc b/.vimrc index b45fc4b..6f36ede 100644 --- a/.vimrc +++ b/.vimrc @@ -21,7 +21,7 @@ Plug 'brandonbloom/csearch.vim' Plug 'chazy/cscope_maps' Plug 'majutsushi/tagbar' "Plug 'airblade/vim-gitgutter' -"Plug 'junegunn/fzf.vim' +Plug 'junegunn/fzf.vim' Plug 'thanthese/Tortoise-Typing' Plug 'altercation/vim-colors-solarized' @@ -76,8 +76,8 @@ set winaltkeys=no if !has("gui_running") && $DISPLAY == '' || !has("gui") set mouse= endif -set background=dark - +set background=light +set number " Plugin Settings {{{2