More tools and improvements

Signed-off-by: Jacob Kiers <kiers@comandi.nl>
This commit is contained in:
Jacob Kiers
2017-12-08 18:36:39 +01:00
parent 4b36c35285
commit 2755650734
12 changed files with 334 additions and 12 deletions

View File

@ -42,13 +42,16 @@ function _prepend_path() {
# Construct $PATH
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
[ -d /usr/texbin ] && _prepend_path "/usr/texbin"
[ -d /usr/local/sbin ] && _prepend_path "/usr/local/sbin"
[ -d /usr/local/bin ] && _prepend_path "/usr/local/bin"
command -v brew >/dev/null 2>&1 && _prepend_path "$(brew --prefix coreutils)/libexec/gnubin"
[ -d $HOME/bin ] && _prepend_path "$HOME/bin"
[ -d $HOME/dotfiles/bin ] && _prepend_path "$HOME/dotfiles/bin"
[ -d "$COMPOSER_HOME/vendor/bin" ] && _prepend_path "$COMPOSER_HOME/vendor/bin"
[ -f /usr/bin/npm ] && _prepend_path "./node_modules/.bin" # Node.js
[ -d /usr/texbin ] && _prepend_path "/usr/texbin" # LaTex
[ -d $HOME/.cargo/bin ] && _prepend_path "$HOME/.cargo/bin" # Rust
command -v brew >/dev/null 2>&1 && _prepend_path "$(brew --prefix coreutils)/libexec/gnubin" # Homebrew
[ -d $HOME/.local/bin ] && _prepend_path "$HOME/.local/bin" # Local bin
[ -d $HOME/bin ] && _prepend_path "$HOME/bin" # ~/bin
[ -d $HOME/dotfiles/bin ] && _prepend_path "$HOME/dotfiles/bin" # Dotfiles bin
[ -d "$COMPOSER_HOME/vendor/bin" ] && _prepend_path "$COMPOSER_HOME/vendor/bin" # PHP Composer
_prepend_path "./vendor/bin"
export PATH
@ -86,9 +89,6 @@ fi
# Tell ls to be colourful
export CLICOLOR=1
# Tell grep to highlight matches
export GREP_OPTIONS='--color=auto'
# Make less the default pager, and specify some useful defaults.
less_options=(
# If the entire text fits on one screen, just show it and quit. (Be more
@ -122,3 +122,5 @@ export PAGER='less'
# Force a green prompt
true
export PATH="$HOME/.cargo/bin:$PATH"

View File

@ -15,7 +15,8 @@
editor = vim -f
# http://stackoverflow.com/questions/136178/git-diff-handling-long-lines
# If doesn't work, try: pager = less -+$LESS -FRX
pager = less -r
pager = diff-highlight | less -RFX
# pager = less -r
autocrlf = false
safecrlf = false
mergeoptions = --no-edit
@ -70,11 +71,16 @@
# DiffMerge
[merge]
ff = no
commit = no
tool = diffmerge
[mergetool "diffmerge"]
cmd = diffmerge --merge --result=$MERGED $LOCAL $BASE $REMOTE
trustExitCode = true
[diff]
algorithm = minimal
compationHeuristic = true
renames = true
tool = diffmerge
[difftool "diffmerge"]
cmd = diffmerge $LOCAL $REMOTE
@ -91,3 +97,5 @@
[init]
templatedir = ~/dotfiles/resources/git-template
[pull]
ff = yes