-alias sl=ls\r
-alias la='ls -A'\r
-alias ll='ls -Al'\r
-alias l1='ls -1'\r
-alias l.='ls -d .[a-z]*'\r
-\r
-lsflags="-hF"\r
-# Detect which `ls` flavor is in use\r
-if [ -x "$(which dircolors 2>/dev/null)" ]; then # GNU `ls`\r
- eval $(dircolors -b $HOME/.dir_colors)\r
- colorflag="--color=auto"\r
- lsflags="$lsflags -I NTUSER.\* -I ntuser.\*"\r
-else # OS X `ls`\r
- export CLICOLOR=1\r
- colorflag="-G"\r
-fi\r
-\r
-alias ls="ls $colorflag $lsflags"\r
-alias grep='grep --color=auto'\r
-alias egrep='egrep --color=auto'\r
-alias fgrep='fgrep --color=auto'\r
-\r
-if [ -e /usr/bin/vimx ]; then alias vim='/usr/bin/vimx'; fi\r
-\r
-# Shortcuts\r
-alias g='git'\r
-alias h='history'\r
-alias j='jobs'\r
-alias v='vim'\r
-alias q='exit'\r
-alias c='clear'\r
-alias cls='clear'\r
-\r
-alias edit="$EDITOR"\r
-alias pager="$PAGER"\r
-\r
-# Easier navigation: .., ..., ...., ....., ~ and -\r
-alias ..="cd .."\r
-alias ...="cd ../.."\r
-alias ....="cd ../../.."\r
-alias .....="cd ../../../.."\r
-alias ~="cd ~" # `cd` is probably faster to type though\r
-alias -- -="cd -"\r
-alias cd=cd_func\r
-alias -- --="cd --"\r
-alias -- -0="cd -0"\r
-alias -- -1="cd -1"\r
-alias -- -2="cd -2"\r
-alias -- -3="cd -3"\r
-alias -- -4="cd -4"\r
-alias -- -5="cd -5"\r
-alias -- -6="cd -6"\r
-alias -- -7="cd -7"\r
-alias -- -8="cd -8"\r
-alias -- -9="cd -9"\r
-\r
-# Secure settings\r
-alias rm='rm -i'\r
-alias cp='cp -i'\r
-alias mv='mv -i'\r
-alias md='mkdir -p'\r
-alias rd='rmdir'\r
-alias mkdate='mkdir "$(date +'%Y%m%d')"'\r
-\r
-if [ ! -x "$(which tree 2>/dev/null)" ]\r
-then\r
- alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"\r
-fi\r
-\r
-alias info='info --vi-keys'\r
-#alias less='less -rX' # raw control characters, don't clear the screen after quitting\r
-\r
-# Enable aliases to be sudo'ed\r
-alias sudo='sudo '\r
-alias _="sudo"\r
-\r
-# Get week number\r
-alias week='date +%V'\r
-\r
-# Stopwatch\r
-alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'\r
-\r
-# Reload the shell (i.e. invoke as a login shell)\r
-alias reload="exec $SHELL -l"\r
-alias gtypist='gtypist -wi'\r
-alias startxwin='run /usr/bin/bash.exe -l -c "/usr/bin/startxwin -- -nolock -unixkill"'\r
-alias startvnc='vncserver -geometry 1870x980 -depth 24'\r
-alias startvnc4='vnc4server -geometry 1870x980 -depth 24'\r
-alias dot='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'\r
-alias genilog='/c/projects/genilog/genilog.py'\r
+alias sl=ls
+alias la='ls -A'
+alias ll='ls -Al'
+alias l1='ls -1'
+alias l.='ls -d .[a-z]*'
+
+lsflags="-hF"
+# Detect which `ls` flavor is in use
+if [ -x "$(which dircolors 2>/dev/null)" ]; then # GNU `ls`
+ eval $(dircolors -b $HOME/.dir_colors)
+ colorflag="--color=auto"
+ lsflags="$lsflags -I NTUSER.\* -I ntuser.\*"
+else # OS X `ls`
+ export CLICOLOR=1
+ colorflag="-G"
+fi
+
+alias ls="ls $colorflag $lsflags"
+alias grep='grep --color=auto'
+alias egrep='egrep --color=auto'
+alias fgrep='fgrep --color=auto'
+
+if [ -e /usr/bin/vimx ]; then alias vim='/usr/bin/vimx'; fi
+
+# Shortcuts
+alias g='git'
+alias h='history'
+alias j='jobs'
+alias v='vim'
+alias q='exit'
+alias c='clear'
+alias cls='clear'
+
+alias edit="$EDITOR"
+alias pager="$PAGER"
+
+# Easier navigation: .., ..., ...., ....., ~ and -
+alias ..="cd .."
+alias ...="cd ../.."
+alias ....="cd ../../.."
+alias .....="cd ../../../.."
+alias ~="cd ~" # `cd` is probably faster to type though
+alias -- -="cd -"
+alias cd=cd_func
+alias -- --="cd --"
+alias -- -0="cd -0"
+alias -- -1="cd -1"
+alias -- -2="cd -2"
+alias -- -3="cd -3"
+alias -- -4="cd -4"
+alias -- -5="cd -5"
+alias -- -6="cd -6"
+alias -- -7="cd -7"
+alias -- -8="cd -8"
+alias -- -9="cd -9"
+
+# Secure settings
+alias rm='rm -i'
+alias cp='cp -i'
+alias mv='mv -i'
+alias md='mkdir -p'
+alias rd='rmdir'
+alias mkdate='mkdir "$(date +'%Y%m%d')"'
+
+if [ ! -x "$(which tree 2>/dev/null)" ]
+then
+ alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
+fi
+
+alias info='info --vi-keys'
+#alias less='less -rX' # raw control characters, don't clear the screen after quitting
+
+# Enable aliases to be sudo'ed
+alias sudo='sudo '
+alias _="sudo"
+
+# Get week number
+alias week='date +%V'
+
+# Stopwatch
+alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
+
-# Add tab completion for many Bash commands\r
-\r
-[ -f /etc/bash_completion ] && . /etc/bash_completion\r
-\r
-[ -f "${HOME}/.cache/bash/git-completion.bash" ] && . "${HOME}/.cache/bash/git-completion.bash"\r
-\r
-# Enable tab completion for `g` by marking it as an alias for `git`\r
-if type _git &> /dev/null; then\r
- complete -o default -o nospace -F _git g;\r
-fi;\r
-\r
-# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards\r
-if [ -e "$HOME/.ssh/config" ]; then\r
- complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2 | tr ' ' '\n')" scp sftp ssh;\r
-fi;\r
+# Add tab completion for many Bash commands
+
+[ -f /etc/bash_completion ] && . /etc/bash_completion
+
+[ -f "${HOME}/.cache/bash/git-completion.bash" ] && . "${HOME}/.cache/bash/git-completion.bash"
+
+# Enable tab completion for `g` by marking it as an alias for `git`
+if type _git &> /dev/null; then
+ complete -o default -o nospace -F _git g;
+fi;
+
+# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
+if [ -e "$HOME/.ssh/config" ]; then
+ complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2 | tr ' ' '\n')" scp sftp ssh;
+fi;
-# Create a new directory and enter it\r
-function mkd() {\r
- mkdir -p "$@" && cd "$@";\r
-}\r
-\r
-# `v` with no arguments opens the current directory in Vim, otherwise opens the\r
-# given location\r
-function v() {\r
- if [ $# -eq 0 ]; then\r
- vim .;\r
- else\r
- vim "$@";\r
- fi;\r
-}\r
-\r
-# `o` with no arguments opens the current directory, otherwise opens the given\r
-# location\r
-function o() {\r
- if [ $# -eq 0 ]; then\r
- open .;\r
- else\r
- open "$@";\r
- fi;\r
-}\r
-\r
-# This function defines a 'cd' replacement function capable of keeping,\r
-# displaying and accessing history of visited directories, up to 10 entries.\r
-# To use it, uncomment it, source this file and try 'cd --'.\r
-\r
-cd_func()\r
-{\r
- local x2 the_new_dir adir index\r
- local -i cnt\r
-\r
- if [[ $1 == "--" ]]; then\r
- dirs -v\r
- return 0\r
- fi\r
-\r
- the_new_dir=$1\r
- [[ -z $1 ]] && the_new_dir=$HOME\r
-\r
- if [[ ${the_new_dir:0:1} == '-' ]]; then\r
- #\r
- # Extract dir N from dirs\r
- index=${the_new_dir:1}\r
- [[ -z $index ]] && index=1\r
- adir=$(dirs +$index)\r
- [[ -z $adir ]] && return 1\r
- the_new_dir=$adir\r
- fi\r
-\r
- #\r
- # '~' has to be substituted by ${HOME}\r
- [[ ${the_new_dir:0:1} == '~' ]] && the_new_dir="${HOME}${the_new_dir:1}"\r
-\r
- #\r
- # Now change to the new dir and add to the top of the stack\r
- pushd "${the_new_dir}" > /dev/null\r
- [[ $? -ne 0 ]] && return 1\r
- the_new_dir=$(pwd)\r
-\r
- #\r
- # Trim down everything beyond 11th entry\r
- popd -n +11 2>/dev/null 1>/dev/null\r
-\r
- #\r
- # Remove any other occurence of this dir, skipping the top of the stack\r
- for ((cnt=1; cnt <= 10; cnt++)); do\r
- x2=$(dirs +${cnt} 2>/dev/null)\r
- [[ $? -ne 0 ]] && return 0\r
- [[ ${x2:0:1} == '~' ]] && x2="${HOME}${x2:1}"\r
- if [[ "${x2}" == "${the_new_dir}" ]]; then\r
- popd -n +$cnt 2>/dev/null 1>/dev/null\r
- cnt=cnt-1\r
- fi\r
- done\r
-\r
- return 0\r
-}\r
+# Create a new directory and enter it
+function mkd() {
+ mkdir -p "$@" && cd "$@";
+}
+
+# `v` with no arguments opens the current directory in Vim, otherwise opens the
+# given location
+function v() {
+ if [ $# -eq 0 ]; then
+ vim .;
+ else
+ vim "$@";
+ fi;
+}
+
+# `o` with no arguments opens the current directory, otherwise opens the given
+# location
+function o() {
+ if [ $# -eq 0 ]; then
+ open .;
+ else
+ open "$@";
+ fi;
+}
+
+# This function defines a 'cd' replacement function capable of keeping,
+# displaying and accessing history of visited directories, up to 10 entries.
+# To use it, uncomment it, source this file and try 'cd --'.
+
+cd_func()
+{
+ local x2 the_new_dir adir index
+ local -i cnt
+
+ if [[ $1 == "--" ]]; then
+ dirs -v
+ return 0
+ fi
+
+ the_new_dir=$1
+ [[ -z $1 ]] && the_new_dir=$HOME
+
+ if [[ ${the_new_dir:0:1} == '-' ]]; then
+ #
+ # Extract dir N from dirs
+ index=${the_new_dir:1}
+ [[ -z $index ]] && index=1
+ adir=$(dirs +$index)
+ [[ -z $adir ]] && return 1
+ the_new_dir=$adir
+ fi
+
+ #
+ # '~' has to be substituted by ${HOME}
+ [[ ${the_new_dir:0:1} == '~' ]] && the_new_dir="${HOME}${the_new_dir:1}"
+
+ #
+ # Now change to the new dir and add to the top of the stack
+ pushd "${the_new_dir}" > /dev/null
+ [[ $? -ne 0 ]] && return 1
+ the_new_dir=$(pwd)
+
+ #
+ # Trim down everything beyond 11th entry
+ popd -n +11 2>/dev/null 1>/dev/null
+
+ #
+ # Remove any other occurence of this dir, skipping the top of the stack
+ for ((cnt=1; cnt <= 10; cnt++)); do
+ x2=$(dirs +${cnt} 2>/dev/null)
+ [[ $? -ne 0 ]] && return 0
+ [[ ${x2:0:1} == '~' ]] && x2="${HOME}${x2:1}"
+ if [[ "${x2}" == "${the_new_dir}" ]]; then
+ popd -n +$cnt 2>/dev/null 1>/dev/null
+ cnt=cnt-1
+ fi
+ done
+
+ return 0
+}
-# Case-insensitive globbing (used in pathname expansion)\r
-shopt -s nocaseglob;\r
-\r
-# Append to the Bash history file, rather than overwriting it\r
-#shopt -s histappend;\r
-\r
-# Autocorrect typos in path names when using `cd`\r
-shopt -s cdspell;\r
-\r
-# Enable some Bash 4 features when possible:\r
-# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`\r
-# * Recursive globbing, e.g. `echo **/*.txt`\r
-for option in autocd globstar; do\r
- shopt -s "$option" 2> /dev/null;\r
-done;\r
-\r
-# Don't use ^D to exit\r
-set -o ignoreeof\r
-set -o vi\r
-\r
+# Case-insensitive globbing (used in pathname expansion)
+shopt -s nocaseglob;
+
+# Append to the Bash history file, rather than overwriting it
+#shopt -s histappend;
+
+# Autocorrect typos in path names when using `cd`
+shopt -s cdspell;
+
+# Enable some Bash 4 features when possible:
+# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
+# * Recursive globbing, e.g. `echo **/*.txt`
+for option in autocd globstar; do
+ shopt -s "$option" 2> /dev/null;
+done;
+
+# Don't use ^D to exit
+set -o ignoreeof
+set -o vi
+
-#!/bin/bash\r
-\r
-# bash_prompt\r
-\r
-# iTerm2 prefs: import Solarized theme (disable bright colors for bold text)\r
-# Color ref: http://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim\r
-# More tips: http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html\r
-\r
-if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then\r
- export TERM='gnome-256color';\r
-elif infocmp xterm-256color >/dev/null 2>&1; then\r
- export TERM='xterm-256color';\r
-fi;\r
-\r
-if [ -f "${HOME}/.cache/bash/git-prompt.sh" ]; then\r
- . "${HOME}/.cache/bash/git-prompt.sh"\r
-\r
- # Enabling any of these options will slow down the prompt\r
- export GIT_PS1_SHOWDIRTYSTATE='y'\r
- export GIT_PS1_SHOWSTASHSTATE='y'\r
- export GIT_PS1_SHOWUNTRACKEDFILES='y'\r
- export GIT_PS1_DESCRIBE_STYLE='contains'\r
- export GIT_PS1_SHOWUPSTREAM='auto'\r
-fi\r
-\r
-# Solarized colors\r
-# (https://github.com/altercation/solarized/tree/master/iterm2-colors-solarized#the-values)\r
-set_prompts()\r
-{\r
-# GREEN="\[$(tput setaf 2)\]"\r
-# RESET="\[$(tput sgr0)\]"\r
-#\r
-## Reset\r
-#Color_Off="\[\033[0m\]" # Text Reset\r
-#\r
-## Regular Colors\r
-#Black="\[\033[0;30m\]" # Black\r
-#Red="\[\033[0;31m\]" # Red\r
-#Green="\[\033[0;32m\]" # Green\r
-#Yellow="\[\033[0;33m\]" # Yellow\r
-#Blue="\[\033[0;34m\]" # Blue\r
-#Purple="\[\033[0;35m\]" # Purple\r
-#Cyan="\[\033[0;36m\]" # Cyan\r
-#White="\[\033[0;37m\]" # White\r
-#\r
-## Bold\r
-#BBlack="\[\033[1;30m\]" # Black\r
-#BRed="\[\033[1;31m\]" # Red\r
-#BGreen="\[\033[1;32m\]" # Green\r
-#BYellow="\[\033[1;33m\]" # Yellow\r
-#BBlue="\[\033[1;34m\]" # Blue\r
-#BPurple="\[\033[1;35m\]" # Purple\r
-#BCyan="\[\033[1;36m\]" # Cyan\r
-#BWhite="\[\033[1;37m\]" # White\r
-#\r
-## Underline\r
-#UBlack="\[\033[4;30m\]" # Black\r
-#URed="\[\033[4;31m\]" # Red\r
-#UGreen="\[\033[4;32m\]" # Green\r
-#UYellow="\[\033[4;33m\]" # Yellow\r
-#UBlue="\[\033[4;34m\]" # Blue\r
-#UPurple="\[\033[4;35m\]" # Purple\r
-#UCyan="\[\033[4;36m\]" # Cyan\r
-#UWhite="\[\033[4;37m\]" # White\r
-#\r
-## Background\r
-#On_Black="\[\033[40m\]" # Black\r
-#On_Red="\[\033[41m\]" # Red\r
-#On_Green="\[\033[42m\]" # Green\r
-#On_Yellow="\[\033[43m\]" # Yellow\r
-#On_Blue="\[\033[44m\]" # Blue\r
-#On_Purple="\[\033[45m\]" # Purple\r
-#On_Cyan="\[\033[46m\]" # Cyan\r
-#On_White="\[\033[47m\]" # White\r
-#\r
-## High Intensty\r
-#IBlack="\[\033[0;90m\]" # Black\r
-#IRed="\[\033[0;91m\]" # Red\r
-#IGreen="\[\033[0;92m\]" # Green\r
-#IYellow="\[\033[0;93m\]" # Yellow\r
-#IBlue="\[\033[0;94m\]" # Blue\r
-#IPurple="\[\033[0;95m\]" # Purple\r
-#ICyan="\[\033[0;96m\]" # Cyan\r
-#IWhite="\[\033[0;97m\]" # White\r
-#\r
-## Bold High Intensty\r
-#BIBlack="\[\033[1;90m\]" # Black\r
-#BIRed="\[\033[1;91m\]" # Red\r
-#BIGreen="\[\033[1;92m\]" # Green\r
-#BIYellow="\[\033[1;93m\]" # Yellow\r
-#BIBlue="\[\033[1;94m\]" # Blue\r
-#BIPurple="\[\033[1;95m\]" # Purple\r
-#BICyan="\[\033[1;96m\]" # Cyan\r
-#BIWhite="\[\033[1;97m\]" # White\r
-#\r
-## High Intensty backgrounds\r
-#On_IBlack="\[\033[0;100m\]" # Black\r
-#On_IRed="\[\033[0;101m\]" # Red\r
-#On_IGreen="\[\033[0;102m\]" # Green\r
-#On_IYellow="\[\033[0;103m\]" # Yellow\r
-#On_IBlue="\[\033[0;104m\]" # Blue\r
-#On_IPurple="\[\033[10;95m\]" # Purple\r
-#On_ICyan="\[\033[0;106m\]" # Cyan\r
-#On_IWhite="\[\033[0;107m\]" # White\r
-#\r
-## Various variables you might want for your PS1 prompt instead\r
-#Time12h="\T"\r
-#Time12a="\@"\r
-#PathShort="\w"\r
-#PathFull="\W"\r
-#NewLine="\n"\r
-#Jobs="\j"\r
-#export PS1="${GREEN}my prompt${RESET}> "\r
-\r
- if [ -x /usr/bin/tput ] && tput setaf 1 >& /dev/null; then\r
- bold=$(tput bold)\r
- reset=$(tput sgr0)\r
-\r
- black=$(tput setaf 0)\r
- blue=$(tput setaf 33)\r
- cyan=$(tput setaf 37)\r
- green=$(tput setaf 64)\r
- orange=$(tput setaf 166)\r
- purple=$(tput setaf 125)\r
- red=$(tput setaf 124)\r
- violet=$(tput setaf 61)\r
- white=$(tput setaf 15)\r
- yellow=$(tput setaf 136)\r
- else\r
- bold=""\r
- reset="\e[0m"\r
-\r
- black="\e[1;30m"\r
- blue="\e[1;34m"\r
- cyan="\e[1;36m"\r
- green="\e[1;32m"\r
- orange="\e[1;33m"\r
- purple="\e[1;35m"\r
- red="\e[1;31m"\r
- violet="\e[1;35m"\r
- white="\e[1;37m"\r
- yellow="\e[1;33m"\r
- fi\r
-\r
- # build the prompt\r
- fg="$white"\r
-\r
- # logged in as root\r
- if [[ "$USER" == "root" ]]; then\r
- userStyle="$bold$red"\r
- else\r
- userStyle="$orange"\r
- fi\r
-\r
- # connected via ssh\r
- if [[ "$SSH_TTY" ]]; then\r
- hostStyle="$bold$red"\r
- else\r
- hostStyle="$yellow"\r
- fi\r
-\r
- # Set the terminal title to the current working directory.\r
- PS1="\[\033]0;\w\007\]"\r
-\r
- if [[ "$TERM" == *color ]]; then\r
-# PS1+=$'\r' # carriage return\r
- PS1+="\[$userStyle\]\u" # username\r
- PS1+="\[$reset$fg\] at "\r
- PS1+="\[$hostStyle\]\h" # host\r
- PS1+="\[$reset$fg\] in "\r
- PS1+="\[$green\]\w" # working directory\r
- # PS1+="\$(prompt_git \"$white on $cyan\")" # git repository details\r
- PS1+="\$(__git_ps1 '\[${fg}\] on \[${cyan}\]%s')"; # on branch\r
- PS1+=$'\n' # newline\r
- PS1+="\[$reset$fg\]\$ \[$reset\]" # $ (and reset color)\r
-\r
- PS2="\[${yellow}\]-> "\r
- PS2+="\[${reset}\]" # reset color\r
- else # no colors\r
- PS1+=$'\r' # carriage return\r
- PS1+="\u at \h in \w on \$(__git_ps1 %s)"\r
- PS1+=$'\n''\$ ' # newline and $\r
-\r
- PS2="-> "\r
- fi\r
-\r
- export PS1 PS2\r
-}\r
-\r
-\r
-set_prompts\r
-unset set_prompts\r
-\r
-# When the shell exits, append to the history file instead of overwriting it\r
-shopt -s histappend\r
-# Larger bash history\r
-export HISTFILESIZE=10000;\r
-export HISTSIZE=5000;\r
-export HISTCONTROL=ignoreboth:erasedups\r
-export HISTIGNORE="ll:ls:cd:cd -:pwd:exit:date:* --help";\r
-# Whenever displaying the prompt, write the previous line to disk\r
-export PROMPT_COMMAND="history -a"\r
-\r
+#!/bin/bash
+
+# bash_prompt
+
+# iTerm2 prefs: import Solarized theme (disable bright colors for bold text)
+# Color ref: http://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim
+# More tips: http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html
+
+if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
+ export TERM='gnome-256color';
+elif infocmp xterm-256color >/dev/null 2>&1; then
+ export TERM='xterm-256color';
+fi;
+
+if [ -f "${HOME}/.cache/bash/git-prompt.sh" ]; then
+ . "${HOME}/.cache/bash/git-prompt.sh"
+
+ # Enabling any of these options will slow down the prompt
+ export GIT_PS1_SHOWDIRTYSTATE='y'
+ export GIT_PS1_SHOWSTASHSTATE='y'
+ export GIT_PS1_SHOWUNTRACKEDFILES='y'
+ export GIT_PS1_DESCRIBE_STYLE='contains'
+ export GIT_PS1_SHOWUPSTREAM='auto'
+fi
+
+# Solarized colors
+# (https://github.com/altercation/solarized/tree/master/iterm2-colors-solarized#the-values)
+set_prompts()
+{
+# GREEN="\[$(tput setaf 2)\]"
+# RESET="\[$(tput sgr0)\]"
+#
+## Reset
+#Color_Off="\[\033[0m\]" # Text Reset
+#
+## Regular Colors
+#Black="\[\033[0;30m\]" # Black
+#Red="\[\033[0;31m\]" # Red
+#Green="\[\033[0;32m\]" # Green
+#Yellow="\[\033[0;33m\]" # Yellow
+#Blue="\[\033[0;34m\]" # Blue
+#Purple="\[\033[0;35m\]" # Purple
+#Cyan="\[\033[0;36m\]" # Cyan
+#White="\[\033[0;37m\]" # White
+#
+## Bold
+#BBlack="\[\033[1;30m\]" # Black
+#BRed="\[\033[1;31m\]" # Red
+#BGreen="\[\033[1;32m\]" # Green
+#BYellow="\[\033[1;33m\]" # Yellow
+#BBlue="\[\033[1;34m\]" # Blue
+#BPurple="\[\033[1;35m\]" # Purple
+#BCyan="\[\033[1;36m\]" # Cyan
+#BWhite="\[\033[1;37m\]" # White
+#
+## Underline
+#UBlack="\[\033[4;30m\]" # Black
+#URed="\[\033[4;31m\]" # Red
+#UGreen="\[\033[4;32m\]" # Green
+#UYellow="\[\033[4;33m\]" # Yellow
+#UBlue="\[\033[4;34m\]" # Blue
+#UPurple="\[\033[4;35m\]" # Purple
+#UCyan="\[\033[4;36m\]" # Cyan
+#UWhite="\[\033[4;37m\]" # White
+#
+## Background
+#On_Black="\[\033[40m\]" # Black
+#On_Red="\[\033[41m\]" # Red
+#On_Green="\[\033[42m\]" # Green
+#On_Yellow="\[\033[43m\]" # Yellow
+#On_Blue="\[\033[44m\]" # Blue
+#On_Purple="\[\033[45m\]" # Purple
+#On_Cyan="\[\033[46m\]" # Cyan
+#On_White="\[\033[47m\]" # White
+#
+## High Intensty
+#IBlack="\[\033[0;90m\]" # Black
+#IRed="\[\033[0;91m\]" # Red
+#IGreen="\[\033[0;92m\]" # Green
+#IYellow="\[\033[0;93m\]" # Yellow
+#IBlue="\[\033[0;94m\]" # Blue
+#IPurple="\[\033[0;95m\]" # Purple
+#ICyan="\[\033[0;96m\]" # Cyan
+#IWhite="\[\033[0;97m\]" # White
+#
+## Bold High Intensty
+#BIBlack="\[\033[1;90m\]" # Black
+#BIRed="\[\033[1;91m\]" # Red
+#BIGreen="\[\033[1;92m\]" # Green
+#BIYellow="\[\033[1;93m\]" # Yellow
+#BIBlue="\[\033[1;94m\]" # Blue
+#BIPurple="\[\033[1;95m\]" # Purple
+#BICyan="\[\033[1;96m\]" # Cyan
+#BIWhite="\[\033[1;97m\]" # White
+#
+## High Intensty backgrounds
+#On_IBlack="\[\033[0;100m\]" # Black
+#On_IRed="\[\033[0;101m\]" # Red
+#On_IGreen="\[\033[0;102m\]" # Green
+#On_IYellow="\[\033[0;103m\]" # Yellow
+#On_IBlue="\[\033[0;104m\]" # Blue
+#On_IPurple="\[\033[10;95m\]" # Purple
+#On_ICyan="\[\033[0;106m\]" # Cyan
+#On_IWhite="\[\033[0;107m\]" # White
+#
+## Various variables you might want for your PS1 prompt instead
+#Time12h="\T"
+#Time12a="\@"
+#PathShort="\w"
+#PathFull="\W"
+#NewLine="\n"
+#Jobs="\j"
+#export PS1="${GREEN}my prompt${RESET}> "
+
+ if [ -x /usr/bin/tput ] && tput setaf 1 >& /dev/null; then
+ bold=$(tput bold)
+ reset=$(tput sgr0)
+
+ black=$(tput setaf 0)
+ blue=$(tput setaf 33)
+ cyan=$(tput setaf 37)
+ green=$(tput setaf 64)
+ orange=$(tput setaf 166)
+ purple=$(tput setaf 125)
+ red=$(tput setaf 124)
+ violet=$(tput setaf 61)
+ white=$(tput setaf 15)
+ yellow=$(tput setaf 136)
+ else
+ bold=""
+ reset="\e[0m"
+
+ black="\e[1;30m"
+ blue="\e[1;34m"
+ cyan="\e[1;36m"
+ green="\e[1;32m"
+ orange="\e[1;33m"
+ purple="\e[1;35m"
+ red="\e[1;31m"
+ violet="\e[1;35m"
+ white="\e[1;37m"
+ yellow="\e[1;33m"
+ fi
+
+ # build the prompt
+ fg="$white"
+
+ # logged in as root
+ if [[ "$USER" == "root" ]]; then
+ userStyle="$bold$red"
+ else
+ userStyle="$orange"
+ fi
+
+ # connected via ssh
+ if [[ "$SSH_TTY" ]]; then
+ hostStyle="$bold$red"
+ else
+ hostStyle="$yellow"
+ fi
+
+ # Set the terminal title to the current working directory.
+ PS1="\[\033]0;\w\007\]"
+
+ if [[ "$TERM" == *color ]]; then
+# PS1+=$'\r' # carriage return
+ PS1+="\[$userStyle\]\u" # username
+ PS1+="\[$reset$fg\] at "
+ PS1+="\[$hostStyle\]\h" # host
+ PS1+="\[$reset$fg\] in "
+ PS1+="\[$green\]\w" # working directory
+ # PS1+="\$(prompt_git \"$white on $cyan\")" # git repository details
+ PS1+="\$(__git_ps1 '\[${fg}\] on \[${cyan}\]%s')"; # on branch
+ PS1+=$'\n' # newline
+ PS1+="\[$reset$fg\]\$ \[$reset\]" # $ (and reset color)
+
+ PS2="\[${yellow}\]-> "
+ PS2+="\[${reset}\]" # reset color
+ else # no colors
+ PS1+=$'\r' # carriage return
+ PS1+="\u at \h in \w on \$(__git_ps1 %s)"
+ PS1+=$'\n''\$ ' # newline and $
+
+ PS2="-> "
+ fi
+
+ export PS1 PS2
+}
+
+
+set_prompts
+unset set_prompts
+
+# When the shell exits, append to the history file instead of overwriting it
+shopt -s histappend
+# Larger bash history
+export HISTFILESIZE=10000;
+export HISTSIZE=5000;
+export HISTCONTROL=ignoreboth:erasedups
+export HISTIGNORE="ll:ls:cd:cd -:pwd:exit:date:* --help";
+# Whenever displaying the prompt, write the previous line to disk
+export PROMPT_COMMAND="history -a"
+
-[[ "$OSTYPE" == *darwin* ]] && return;\r
-\r
-echo -ne '\eP\e]10;#839496\a' # Foreground -> base0\r
-echo -ne '\eP\e]11;#002B36\a' # Background -> base03\r
-\r
-echo -ne '\eP\e]12;#DC322F\a' # Cursor -> red\r
-\r
-echo -ne '\eP\e]4;0;#073642\a' # black -> Base02\r
-echo -ne '\eP\e]4;8;#002B36\a' # bold black -> Base03\r
-echo -ne '\eP\e]4;1;#DC322F\a' # red -> red\r
-echo -ne '\eP\e]4;9;#CB4B16\a' # bold red -> orange\r
-echo -ne '\eP\e]4;2;#859900\a' # green -> green\r
-echo -ne '\eP\e]4;10;#586E75\a' # bold green -> base01 *\r
-echo -ne '\eP\e]4;3;#B58900\a' # yellow -> yellow\r
-echo -ne '\eP\e]4;11;#657B83\a' # bold yellow -> base00 *\r
-echo -ne '\eP\e]4;4;#268BD2\a' # blue -> blue\r
-echo -ne '\eP\e]4;12;#839496\a' # bold blue -> base0 *\r
-echo -ne '\eP\e]4;5;#D33682\a' # magenta -> magenta\r
-echo -ne '\eP\e]4;13;#6C71C4\a' # bold magenta -> violet\r
-echo -ne '\eP\e]4;6;#2AA198\a' # cyan -> cyan\r
-echo -ne '\eP\e]4;14;#93A1A1\a' # bold cyan -> base1 *\r
-echo -ne '\eP\e]4;7;#EEE8D5\a' # white -> Base2\r
-echo -ne '\eP\e]4;15;#FDF6E3\a' # bold white -> Base3\r
+[[ "$OSTYPE" == *darwin* ]] && return;
+
+echo -ne '\eP\e]10;#839496\a' # Foreground -> base0
+echo -ne '\eP\e]11;#002B36\a' # Background -> base03
+
+echo -ne '\eP\e]12;#DC322F\a' # Cursor -> red
+
+echo -ne '\eP\e]4;0;#073642\a' # black -> Base02
+echo -ne '\eP\e]4;8;#002B36\a' # bold black -> Base03
+echo -ne '\eP\e]4;1;#DC322F\a' # red -> red
+echo -ne '\eP\e]4;9;#CB4B16\a' # bold red -> orange
+echo -ne '\eP\e]4;2;#859900\a' # green -> green
+echo -ne '\eP\e]4;10;#586E75\a' # bold green -> base01 *
+echo -ne '\eP\e]4;3;#B58900\a' # yellow -> yellow
+echo -ne '\eP\e]4;11;#657B83\a' # bold yellow -> base00 *
+echo -ne '\eP\e]4;4;#268BD2\a' # blue -> blue
+echo -ne '\eP\e]4;12;#839496\a' # bold blue -> base0 *
+echo -ne '\eP\e]4;5;#D33682\a' # magenta -> magenta
+echo -ne '\eP\e]4;13;#6C71C4\a' # bold magenta -> violet
+echo -ne '\eP\e]4;6;#2AA198\a' # cyan -> cyan
+echo -ne '\eP\e]4;14;#93A1A1\a' # bold cyan -> base1 *
+echo -ne '\eP\e]4;7;#EEE8D5\a' # white -> Base2
+echo -ne '\eP\e]4;15;#FDF6E3\a' # bold white -> Base3
-# Default\r
-#* text=auto\r
-\r
-# Text files that should be normalized (CRLF => LF)\r
-#*.c text\r
-#*.h text\r
-\r
-# Text files with fixed EOL=LF\r
-#*.sh text eol=LF\r
-\r
-# Text files with fixed EOL=CRLF$\r
-#*.bat text eol=CRLF\r
-#*.ahk text eol=crlf\r
-#*.vcproj text eol=crlf\r
-\r
-# Binary files\r
-#*.reg binary\r
-#*.exe binary\r
+# Default
+#* text=auto
+
+# Text files that should be normalized (CRLF => LF)
+#*.c text
+#*.h text
+
+# Text files with fixed EOL=LF
+#*.sh text eol=LF
+
+# Text files with fixed EOL=CRLF$
+#*.bat text eol=CRLF
+#*.ahk text eol=crlf
+#*.vcproj text eol=crlf
+
+# Binary files
+#*.reg binary
+#*.exe binary
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
-[github]\r
- user = jannikz\r
-[alias]\r
- a = add\r
- una = reset HEAD --\r
- uha = checkout HEAD --\r
- unaa = reset HEAD\r
- uhaa = reset --hard HEAD\r
- br = branch\r
- brdm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"\r
- co = checkout\r
- go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"\r
- ci = commit\r
- amend = commit --amend\r
- unci = reset --soft HEAD~\r
- diff = diff --word-diff\r
- dt = difftool\r
- mt = mergetool\r
- # dont pull without rebase, and dont push without pull (fetch & merge)\r
- p = pull --rebase\r
- pp = "!git pull --rebase && git push"\r
- # avoid merge commits\r
- mf = merge --ff-only\r
- cp = cherry-pick\r
- wc = whatchanged -p\r
- ch = cherry -v\r
- s = status -sb\r
- fs = "!git fetch && git status"\r
- rb = rebase\r
- ec = config --global -e\r
- l = log --oneline --decorate\r
- lg = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph\r
+[github]
+ user = jannikz
+[alias]
+ a = add
+ una = reset HEAD --
+ uha = checkout HEAD --
+ unaa = reset HEAD
+ uhaa = reset --hard HEAD
+ br = branch
+ brdm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
+ co = checkout
+ go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
+ ci = commit
+ amend = commit --amend
+ unci = reset --soft HEAD~
+ diff = diff --word-diff
+ dt = difftool
+ mt = mergetool
+ # dont pull without rebase, and dont push without pull (fetch & merge)
+ p = pull --rebase
+ pp = "!git pull --rebase && git push"
+ # avoid merge commits
+ mf = merge --ff-only
+ cp = cherry-pick
+ wc = whatchanged -p
+ ch = cherry -v
+ s = status -sb
+ fs = "!git fetch && git status"
+ rb = rebase
+ ec = config --global -e
+ l = log --oneline --decorate
+ lg = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph
lol = log --oneline --decorate --graph --all --first-parent
- last = log -1 HEAD\r
- ls = ls-files\r
- lt = tag -l\r
- type = cat-file -t\r
- dump = cat-file -p\r
- who = shortlog -s --\r
- remotes = remote -v\r
- root = rev-parse --show-toplevel\r
- cl = clone --recursive\r
+ last = log -1 HEAD
+ ls = ls-files
+ lt = tag -l
+ type = cat-file -t
+ dump = cat-file -p
+ who = shortlog -s --
+ remotes = remote -v
+ root = rev-parse --show-toplevel
+ cl = clone --recursive
- # Show the diff between the latest commit and the current state\r
- d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"\r
- # `git di $number` shows the diff between the state `$number` revisions ago and the current state\r
- di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"\r
+ # 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"
- # Find branches containing commit\r
- fb = "!f() { git branch -a --contains $1; }; f"\r
- # Find tags containing commit\r
- ft = "!f() { git describe --always --contains $1; }; f"\r
- # Find commits by source code\r
- fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"\r
- # Find commits by commit message\r
- fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"\r
+ # Find branches containing commit
+ fb = "!f() { git branch -a --contains $1; }; f"
+ # Find tags containing commit
+ ft = "!f() { git describe --always --contains $1; }; f"
+ # Find commits by source code
+ fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"
+ # Find commits by commit message
+ fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
- #Credit an author on the latest commit\r
- credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"\r
- # List contributors with number of commits\r
- contributors = shortlog --summary --numbered\r
+ #Credit an author on the latest commit
+ credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
+ # List contributors with number of commits
+ contributors = shortlog --summary --numbered
- k = !gitk\r
- visual = !gitk\r
+ k = !gitk
+ visual = !gitk
- ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags"\r
- gtags = "!sh -c '[ -f .git/hooks/gtags ] || git init; .git/hooks/gtags' git-gtags"\r
- cscope = "!sh -c '[ -f .git/hooks/cscope ] || git init; .git/hooks/cscope' git-cscope"\r
- \r
-[help]\r
- autocorrect = 10\r
-[branch]\r
- autosetupmerge = always\r
- autosetuprebase = always\r
-[rebase]\r
- autosquash = true\r
- autostash = true\r
-[pull]\r
- rebase = true\r
-[push]\r
- default = simple\r
-[diff]\r
- tool = vimdiff\r
-[difftool]\r
- prompt = false\r
-[merge]\r
- tool = vimdiff\r
- conflictstyle = diff3\r
-[mergetool]\r
- prompt = false\r
-[init]\r
- templatedir = ~/.config/git/templates\r
-[core]\r
+ 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"
+
+[help]
+ autocorrect = 10
+[branch]
+ autosetupmerge = always
+ autosetuprebase = always
+[rebase]
+ autosquash = true
+ autostash = true
+[pull]
+ rebase = true
+[push]
+ default = simple
+[diff]
+ tool = vimdiff
+[difftool]
+ prompt = false
+[merge]
+ tool = vimdiff
+ conflictstyle = diff3
+[mergetool]
+ prompt = false
+[init]
+ templatedir = ~/.config/git/templates
+[core]
excludesfile =
- attributesFile = ~/.config/git/attributes\r
- editor = vim\r
+ attributesFile = ~/.config/git/attributes
+ editor = vim
# eol = native
autocrlf = false
[include]
-# Ignore tags created by etags, ctags, gtags (GNU global) and cscope\r
-TAGS\r
-.TAGS\r
-!TAGS/\r
-tags\r
-.tags\r
-!tags/\r
-gtags.files\r
-GTAGS\r
-GRTAGS\r
-GPATH\r
-cscope.files\r
-cscope.out\r
-cscope.in.out\r
-cscope.po.out\r
-\r
-# Windows image file caches\r
-Thumbs.db\r
-ehthumbs.db\r
-\r
-# Folder config file\r
-Desktop.ini\r
-\r
-# Recycle Bin used on file shares\r
-$RECYCLE.BIN/\r
-\r
-# Windows Installer files\r
-*.cab\r
-*.msi\r
-*.msm\r
-*.msp\r
-\r
-# Windows shortcuts\r
-*.lnk\r
-\r
-\r
-# OSX\r
-*.DS_Store\r
-.AppleDouble\r
-.LSOverride\r
-\r
-# Icon must end with two \r\r
-Icon\r
-\r
-# Thumbnails\r
-._*\r
-\r
-# Files that might appear in the root of a volume\r
-.DocumentRevisions-V100\r
-.fseventsd\r
-.Spotlight-V100\r
-.TemporaryItems\r
-.Trashes\r
-.VolumeIcon.icns\r
-.com.apple.timemachine.donotpresent\r
-\r
-# Directories potentially created on remote AFP share\r
-.AppleDB\r
-.AppleDesktop\r
-Network Trash Folder\r
-Temporary Items\r
-.apdisk\r
-\r
-__pycache__\r
+# Ignore tags created by etags, ctags, gtags (GNU global) and cscope
+TAGS
+.TAGS
+!TAGS/
+tags
+.tags
+!tags/
+gtags.files
+GTAGS
+GRTAGS
+GPATH
+cscope.files
+cscope.out
+cscope.in.out
+cscope.po.out
+
+# Windows image file caches
+Thumbs.db
+ehthumbs.db
+
+# Folder config file
+Desktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
+
+# OSX
+*.DS_Store
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+
+__pycache__
-export USERNAME=$LOGNAME\r
-export HOSTNAME=`hostname`\r
-#echo Welcome $USERNAME. You are on Server: $HOSTNAME !!!\r
-\r
-# Set defaults\r
-export SHELL='bash'\r
-export EDITOR='vim'\r
-export VISUAL='vim'\r
-export PAGER='less -eFRX'\r
-export MANPAGER="less -eFRX"\r
-export BROWSER='lynx -vikeys -use_mouse'\r
-\r
-\r
-# Prefer US language and UTF-8\r
-export LANG="en_US.UTF-8";\r
-export LC_ALL="en_US.UTF-8";\r
-#export LC_ALL="en_DK.UTF-8";\r
-#export LC_NUMERIC=en_DK.UTF-8\r
-#export LC_TIME=en_DK.UTF-8\r
-#export LC_MONETARY=en_DK.UTF-8\r
-#export LC_PAPER=en_DK.UTF-8\r
-#export LC_MEASUREMENT=en_DK.UTF-8\r
-export KEYMAP=us\r
-# Highlight section titles in manual pages\r
-export LESS_TERMCAP_md="${yellow}";\r
-\r
-# Always enable colored `grep` output\r
-#export GREP_OPTIONS="--color=auto";\r
-\r
-# Set up syntax highlighting for 'less' (requires source-highlight package)\r
-# See http://www.gnu.org/software/src-highlite/source-highlight.html\r
-# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"\r
-export LESS=-eFRX\r
-\r
-#export GTEST_DIR='c:/googletest-release-1.7.0'\r
-#export GTEST_DIR='c:/googletest-release-1.8.0'\r
-#export CPPUNITDIR='c:/cppunit-1.12.1'\r
-#export CPPUNITDIR='c:/cppunit-1.13.2'\r
-export CPPUNITDIR_2013='c:/programs/cppunit_2013'\r
-\r
-export VIRTUALENVWRAPPER_PYTHON=/mingw64/bin/python3\r
-\r
-#export XDG_CONFIG_HOME = ~/.config/\r
-#export XDG_DATA_HOME = ~/.local/share/\r
-#export XDG_DATA_DIRS = /usr/local/share/:/usr/share/\r
-if [ -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs ]; then\r
- . ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs\r
- export XDG_DESKTOP_DIR XDG_DOWNLOAD_DIR XDG_TEMPLATES_DIR XDG_PUBLICSHARE_DIR XDG_DOCUMENTS_DIR XDG_MUSIC_DIR XDG_PICTURES_DIR XDG_VIDEOS_DIR\r
-fi\r
+export USERNAME=$LOGNAME
+export HOSTNAME=`hostname`
+#echo Welcome $USERNAME. You are on Server: $HOSTNAME !!!
+
+# Set defaults
+export SHELL='bash'
+export EDITOR='vim'
+export VISUAL='vim'
+export PAGER='less -eFRX'
+export MANPAGER="less -eFRX"
+export BROWSER='lynx -vikeys -use_mouse'
+
+
+# Prefer US language and UTF-8
+export LANG="en_US.UTF-8";
+export LC_ALL="en_US.UTF-8";
+#export LC_ALL="en_DK.UTF-8";
+#export LC_NUMERIC=en_DK.UTF-8
+#export LC_TIME=en_DK.UTF-8
+#export LC_MONETARY=en_DK.UTF-8
+#export LC_PAPER=en_DK.UTF-8
+#export LC_MEASUREMENT=en_DK.UTF-8
+export KEYMAP=us
+# Highlight section titles in manual pages
+export LESS_TERMCAP_md="${yellow}";
+
+# Always enable colored `grep` output
+#export GREP_OPTIONS="--color=auto";
+
+# Set up syntax highlighting for 'less' (requires source-highlight package)
+# See http://www.gnu.org/software/src-highlite/source-highlight.html
+# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
+export LESS=-eFRX
+
+#export GTEST_DIR='c:/googletest-release-1.7.0'
+#export GTEST_DIR='c:/googletest-release-1.8.0'
+#export CPPUNITDIR='c:/cppunit-1.12.1'
+#export CPPUNITDIR='c:/cppunit-1.13.2'
+export CPPUNITDIR_2013='c:/programs/cppunit_2013'
+
+export VIRTUALENVWRAPPER_PYTHON=/mingw64/bin/python3
+
+#export XDG_CONFIG_HOME = ~/.config/
+#export XDG_DATA_HOME = ~/.local/share/
+#export XDG_DATA_DIRS = /usr/local/share/:/usr/share/
+if [ -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs ]; then
+ . ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
+ export XDG_DESKTOP_DIR XDG_DOWNLOAD_DIR XDG_TEMPLATES_DIR XDG_PUBLICSHARE_DIR XDG_DOCUMENTS_DIR XDG_MUSIC_DIR XDG_PICTURES_DIR XDG_VIDEOS_DIR
+fi
-# Install git completion\r
-if [ ! -f "${HOME}/.cache/bash/git-completion.bash" ]; then\r
- URL="https://raw.githubusercontent.com/git/git/master/contrib/completion"\r
- mkdir -p ${HOME}/.cache/bash > /dev/null 2>&1\r
- curl "${URL}/git-completion.bash" -L -s -o "${HOME}/.cache/bash/git-completion.bash"\r
- curl "${URL}/git-prompt.sh" -L -s -o "${HOME}/.cache/bash/git-prompt.sh"\r
-fi\r
-\r
-# Install fzf\r
-if [ ! -f "${HOME}/.cache/fzf/install" ]; then\r
- git clone --depth 1 https://github.com/junegunn/fzf.git $HOME/.cache/fzf\r
- $HOME/.cache/fzf/install\r
-fi\r
+# Install git completion
+if [ ! -f "${HOME}/.cache/bash/git-completion.bash" ]; then
+ URL="https://raw.githubusercontent.com/git/git/master/contrib/completion"
+ mkdir -p ${HOME}/.cache/bash > /dev/null 2>&1
+ curl "${URL}/git-completion.bash" -L -s -o "${HOME}/.cache/bash/git-completion.bash"
+ curl "${URL}/git-prompt.sh" -L -s -o "${HOME}/.cache/bash/git-prompt.sh"
+fi
+
+# Install fzf
+if [ ! -f "${HOME}/.cache/fzf/install" ]; then
+ git clone --depth 1 https://github.com/junegunn/fzf.git $HOME/.cache/fzf
+ $HOME/.cache/fzf/install
+fi
-# Set XDG directory defaults\r
-#export XDG_DATA_DIRS=/usr/share/\r
-#export XDG_CONFIG_DIRS=/etc/xdg/\r
-\r
-PATH=.:${HOME}/bin:${PATH}\r
-#PATH=/c/ProgramData/chocolatey/bin:${PATH}\r
-PATH=${HOME}/.gem/ruby/2.3.0/gems/asciidoctor-1.5.6.1/bin:${PATH}\r
-\r
-# Set PATH so it includes user's private bin if it exists\r
-if [ -d "${HOME}/.local/bin" ] ; then\r
- PATH=${HOME}/.local/bin:${PATH}\r
-fi\r
-\r
-# Set MANPATH so it includes users' private man if it exists\r
-if [ -d "${HOME}/.local/share/man" ]; then\r
- MANPATH="${HOME}/.local/share/man:${MANPATH}"\r
-fi\r
-\r
-# Set INFOPATH so it includes users' private info if it exists\r
-if [ -d "${HOME}/.local/share/info" ]; then\r
- INFOPATH="${HOME}/.local/share/info:${INFOPATH}"\r
-fi\r
-\r
-# Set PATH to temporary folders\r
-export TMPDIR="${HOME}/.tmp"\r
-export TEMPDIR="$TMPDIR"\r
-export TEMP="$TMPDIR"\r
-export TMP="$TMPDIR"\r
-mkdir -m700 "$TMPDIR" > /dev/null 2>&1\r
-\r
-# Set PATH to PREFIX folders\r
-export PREFIX="${HOME}/.local/"\r
-\r
-# Add local libraries to libpath\r
-# LD_LIBRARY_PATH="${PREFIX}/lib:${LD_LIBRARY_PATH}"\r
-\r
-# Setup some the location environment variable.\r
-#export MYVIMRC="$HOME/.config/vim/vimrc"\r
-export INPUTRC="$HOME/.inputrc"\r
-export HISTFILE="$HOME/.local/share/bash/history";\r
-\r
-\r
+# Set XDG directory defaults
+#export XDG_DATA_DIRS=/usr/share/
+#export XDG_CONFIG_DIRS=/etc/xdg/
+
+PATH=.:${HOME}/bin:${PATH}
+#PATH=/c/ProgramData/chocolatey/bin:${PATH}
+PATH=${HOME}/.gem/ruby/2.3.0/gems/asciidoctor-1.5.6.1/bin:${PATH}
+
+# Set PATH so it includes user's private bin if it exists
+if [ -d "${HOME}/.local/bin" ] ; then
+ PATH=${HOME}/.local/bin:${PATH}
+fi
+
+# Set MANPATH so it includes users' private man if it exists
+if [ -d "${HOME}/.local/share/man" ]; then
+ MANPATH="${HOME}/.local/share/man:${MANPATH}"
+fi
+
+# Set INFOPATH so it includes users' private info if it exists
+if [ -d "${HOME}/.local/share/info" ]; then
+ INFOPATH="${HOME}/.local/share/info:${INFOPATH}"
+fi
+
+# Set PATH to temporary folders
+export TMPDIR="${HOME}/.tmp"
+export TEMPDIR="$TMPDIR"
+export TEMP="$TMPDIR"
+export TMP="$TMPDIR"
+mkdir -m700 "$TMPDIR" > /dev/null 2>&1
+
+# Set PATH to PREFIX folders
+export PREFIX="${HOME}/.local/"
+
+# Add local libraries to libpath
+# LD_LIBRARY_PATH="${PREFIX}/lib:${LD_LIBRARY_PATH}"
+
+# Setup some the location environment variable.
+#export MYVIMRC="$HOME/.config/vim/vimrc"
+export INPUTRC="$HOME/.inputrc"
+export HISTFILE="$HOME/.local/share/bash/history";
+
+
-# This file is written by xdg-user-dirs-update\r
-# If you want to change or add directories, just edit the line you're\r
-# interested in. All local changes will be retained on the next run\r
-# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped\r
-# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an\r
-# absolute path. No other format is supported.\r
-# \r
-XDG_DESKTOP_DIR="$HOME/Desktop"\r
-XDG_DOWNLOAD_DIR="$HOME/Downloads"\r
-XDG_TEMPLATES_DIR="$HOME/Templates"\r
-XDG_PUBLICSHARE_DIR="$HOME/Public"\r
-XDG_DOCUMENTS_DIR="$HOME/Documents"\r
-XDG_MUSIC_DIR="$HOME/Music"\r
-XDG_PICTURES_DIR="$HOME/Pictures"\r
-XDG_VIDEOS_DIR="$HOME/Videos"\r
+# This file is written by xdg-user-dirs-update
+# If you want to change or add directories, just edit the line you're
+# interested in. All local changes will be retained on the next run
+# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
+# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
+# absolute path. No other format is supported.
+#
+XDG_DESKTOP_DIR="$HOME/Desktop"
+XDG_DOWNLOAD_DIR="$HOME/Downloads"
+XDG_TEMPLATES_DIR="$HOME/Templates"
+XDG_PUBLICSHARE_DIR="$HOME/Public"
+XDG_DOCUMENTS_DIR="$HOME/Documents"
+XDG_MUSIC_DIR="$HOME/Music"
+XDG_PICTURES_DIR="$HOME/Pictures"
+XDG_VIDEOS_DIR="$HOME/Videos"
-" section: environment {{{1\r
-" ---------------------\r
-\r
-if (empty(glob('~/.cache/vim/autoload/plug.vim')) ||\r
- \ empty(glob('~/.local/share/vim/viminfo')))\r
- cd ~\r
- silent !mkdir -p .local/share/vim/{swap,backup,undo}\r
- silent !mkdir -p .cache/vim/autoload\r
- silent !curl -fLo .cache/vim/autoload/plug.vim\r
- \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim\r
- autocmd VimEnter * PlugInstall | source $MYVIMRC\r
- cd -\r
-endif\r
-\r
-set directory=~/.local/share/vim/swap\r
-set backupdir=~/.local/share/vim/backup\r
-set undodir=~/.local/share/vim/undo\r
-set viminfo+=n~/.local/share/vim/viminfo\r
-set runtimepath+=~/.cache/vim\r
-\r
-" section: plugins {{{1\r
-" ---------------------\r
-silent call plug#begin('~/.cache/vim/bundle')\r
-Plug 'tpope/vim-repeat'\r
-Plug 'tpope/vim-fugitive'\r
-Plug 'tpope/vim-surround'\r
-Plug 'tpope/vim-commentary'\r
-Plug 'tpope/vim-unimpaired'\r
-Plug 'tpope/vim-dispatch'\r
-"Plug 'tpope/vim-vinager'\r
-Plug 'scrooloose/syntastic'\r
-"Plug 'vim-airline/vim-airline'\r
-Plug 'airblade/vim-gitgutter'\r
-Plug 'majutsushi/tagbar'\r
-Plug 'fholgado/minibufexpl.vim'\r
-Plug 'brookhong/cscope.vim'\r
-Plug 'ctrlpvim/ctrlp.vim'\r
-Plug 'brandonbloom/csearch.vim'\r
-Plug 'mileszs/ack.vim'\r
-Plug 'jeetsukumaran/vim-filesearch'\r
-Plug 'haya14busa/incsearch.vim'\r
-Plug 'altercation/vim-colors-solarized'\r
-Plug 'editorconfig/editorconfig-vim'\r
-Plug 'johnsyweb/vim-makeshift'\r
-Plug 'tfnico/vim-gradle'\r
-"Plug 'a.vim'\r
-"Plug 'heaths/vim-msbuild'\r
-"Plug 'hdima/python-syntax'\r
-"Plug 'klen/python-mode'\r
-"Plug 'jalcine/cmake.vim'\r
-call plug#end()\r
-\r
-" section: options {{{1\r
-" ---------------------\r
-\r
-"set autoindent\r
-set autoread\r
-set autowrite " automatically save before commands like :next and :make\r
-set background=dark\r
-set backspace=2\r
-if exists('+breakindent')\r
- set breakindent showbreak=\ +\r
-endif\r
-set cmdheight=2\r
-setglobal commentstring=#\ %s\r
-set complete-=i " searching includes can be slow\r
-"if has("win32") || has("win64")\r
-" does not work for msys2\r
-set clipboard=unnamed\r
-"else\r
-"set clipboard=unnamedplus\r
-"endif\r
-set fileformats=unix,dos,mac\r
-"set foldmethod=syntax\r
-"set foldlevel=1\r
-"set foldclose=all\r
-"set foldopen+=jump\r
-set guioptions+=a\r
-set history=200\r
-set incsearch " incremental search\r
-set laststatus=2 " always show status line\r
-set lazyredraw\r
-set linebreak\r
-set mouse=nvi\r
-set mousemodel=popup\r
-set number\r
-"set pastetoggle=<f2>\r
-set path=.,,**,C:\programs\IAR\\\ System\EWB_V850_V360\common\bin\r
-set printoptions=paper:letter\r
-set scrolloff=1\r
-set shiftround\r
-set shortmess=aoOtI\r
-"set showcmd " show (partial) command in status line.\r
-set showmatch " show matching brackets.\r
-set sidescrolloff=5\r
-set smartcase " case insensitive searches become sensitive with capitals\r
-"setglobal tags=./tags;\r
-set timeoutlen=500 " leader key timeout\r
-set ttimeoutlen=50 " make esc work faster\r
-set visualbell\r
-if exists('+undofile')\r
- set undofile\r
-endif\r
-set virtualedit=block\r
-set updatetime=250\r
-set wildmenu\r
-set wildmode=longest:full,full\r
-set wildignore+=tags,.*.un~,*.pyc\r
-set winaltkeys=no\r
-\r
-"if !has("gui_running") && $display == '' || !has("gui")\r
-" set mouse=\r
-"endif\r
-"\r
-"set makeprg=cmake\ --build\ .\r
-" Visual studio 2013\r
-"set errorformat=\ %#%f(%l):\ %m\r
-" Visual studio 2008\r
-"set errorformat=%.%#>\ %#%f(%l)\ :\ %m\r
-"\r
-" IAR compiler\r
-set makeprg=vim-iarbuild.cmd\r
-set errorformat=%f(%l)\ :\ %m\r
-\r
-"syn match pythonDefStatement /^\s*\%(def\|class\)/\r
-" \ nextgroup=pythonFunction skipwhite\r
-"syn region pythonFunctionFold start="^\z(\s*\)\%(def\|class\)\>"\r
-" \ end="\ze\%(\s*\n\)\+\%(\z1\s\)\@!." fold transparent\r
-\r
-"hi link pythonDefStatement Statement\r
-\r
-let g:syntastic_quiet_messages = { "type": "style" }\r
-\r
-" plugin settings {{{1\r
-let g:netrw_liststyle=3\r
-let g:netrw_banner = 0\r
-let g:netrw_sort_sequence = '[\/]$,*'\r
-\r
-let g:solarized_menu=0\r
-let g:markdown_fenced_languages = ['html', 'python', 'bash=sh']\r
-let g:markdown_syntax_conceal = 0\r
-\r
-" %s is replaced with fzf command\r
-"let g:fzf_launcher = 'xterm -e bash -ic %s'\r
-"let g:fzf_launcher = "in_a_new_term_function %s"\r
-\r
-"for airline\r
-"let g:airline#extensions#tabline#enabled = 1\r
-\r
-let g:editorconfig_exclude_patterns = ['fugitive://.*', 'scp://.*']\r
-let g:editorconfig_verbose = 1\r
-\r
-if has("win32")\r
- let g:EditorConfig_exec_path = "C:\programs\editorconfig\bin\editorconfig.exe"\r
-else\r
- let g:editorconfig_core_mode = "python_builtin"\r
-endif\r
-\r
-set colorcolumn=80\r
-highlight ColorColumn ctermbg=9\r
-\r
-" block cursor in normal mode\r
-let &t_ti.="\e[1 q"\r
-let &t_SI.="\e[5 q"\r
-let &t_EI.="\e[1 q"\r
-let &t_te.="\e[0 q"\r
-\r
-let python_folding = 1\r
-" }}}2\r
-" section: commands {{{1\r
-"-----------------------\r
-\r
-if has("cscope")\r
- set nocscopetag\r
- set cscopequickfix=s-,c-,d-,i-,t-,e-\r
- set nocscopeverbose\r
- if filereadable(".git/cscope.out")\r
- cscope add .git/cscope.out\r
- endif\r
- set cscopeverbose\r
-\r
- function! Cscoperebuild()\r
- cscope kill .git/cscope.out\r
- silent execute "!./.git/hooks/cscope"\r
- if v:shell_error\r
- redraw!\r
- echohl errormsg | echo "unable to run cscope command." | echohl none\r
- else\r
- if filereadable(".git/cscope.out")\r
- redraw!\r
- cscope add .git/cscope.out\r
- else\r
- redraw!\r
- echohl errormsg | echo "unable to read cscope database." | echohl none\r
- endif\r
- endif\r
- endfunction\r
-\r
- command! Cscope call Cscoperebuild()\r
-endif"\r
-\r
-\r
-" section: mappings {{{1\r
-" ----------------------\r
-"\r
-let mapleader = ","\r
-\r
-\r
-" Quickly edit/reload the vimrc file\r
-nmap <silent> <leader>ev :e $MYVIMRC<CR>\r
-nmap <silent> <leader>sv :so $MYVIMRC<CR>\r
-\r
-" Minibufferexplorer\r
-nnoremap <Leader>b :MBEToggle<cr>\r
-"let g:miniBufExplMapWindowNavVim = 1\r
-"let g:miniBufExplMapCTabSwitchBufs = 1\r
-"\r
-" Tagbar\r
-nnoremap <Leader>t :TagbarToggle<CR>\r
-\r
-" copy/paste from system clipboard\r
-if has("win32")\r
-vnoremap <Leader>y "*y\r
-vnoremap <Leader>d "*d\r
-nnoremap <Leader>p "*p\r
-nnoremap <Leader>P "*P\r
-\r
-vnoremap <Leader>p "*p\r
-vnoremap <Leader>P "*P\r
-else\r
-" nnoremap <Leader>y "*y\r
-" nnoremap <Leader>p "*p\r
-" nnoremap <Leader>Y "+y\r
-" nnoremap <Leader>P "+p\r
-" nnoremap <Leader>y "*y\r
-" nnoremap <Leader>yy "*yy\r
-" noremap <Leader>p "*p\r
-" noremap <Leader>P "*P\r
-endif\r
-\r
-if has("cscope")\r
-" cnoreabbrev <expr> csa\r
-" \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs add' : 'csa')\r
-" cnoreabbrev <expr> csf\r
-" \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs find' : 'csf')\r
-" cnoreabbrev <expr> csk\r
-" \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs kill' : 'csk')\r
-" cnoreabbrev <expr> csr\r
-" \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs reset' : 'csr')\r
-" cnoreabbrev <expr> css\r
-" \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs show' : 'css')\r
-" cnoreabbrev <expr> csh\r
-" \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs help' : 'csh')\r
-\r
- nnoremap <leader>fa :call CscopeFindInteractive(expand('<cword>'))<CR>\r
- nnoremap <leader>l :call ToggleLocationList()<CR>\r
-\r
- " s: Find this C symbol\r
- nnoremap <leader>fs :call CscopeFind('s', expand('<cword>'))<CR>\r
- " g: Find this definition\r
- nnoremap <leader>fg :call CscopeFind('g', expand('<cword>'))<CR>\r
- " d: Find functions called by this function\r
- nnoremap <leader>fd :call CscopeFind('d', expand('<cword>'))<CR>\r
- " c: Find functions calling this function\r
- nnoremap <leader>fc :call CscopeFind('c', expand('<cword>'))<CR>\r
- " t: Find this text string\r
- nnoremap <leadpr>ft :call CscopeFind('t', expand('<cword>'))<CR>\r
- " e: Find this egrep pattern\r
- nnoremap <leader>fe :call CscopeFind('e', expand('<cword>'))<CR>\r
- " f: Find this file\r
- nnoremap <leader>ff :call CscopeFind('f', expand('<cword>'))<CR>\r
- " i: Find files #including this file\r
- nnoremap <leader>fi :call CscopeFind('i', expand('<cword>'))<CR>\r
-\r
- "todo: figure out how to get cstag output in quickfix or a popup menu.\r
- map <c-_> :cstag <c-r>=expand("<cword>")<cr><cr>\r
-endif\r
-\r
-" Maps Ctrl-[h,j,k,l] to windows split navigations\r
-nnoremap <C-h> <C-W><C-H>\r
-nnoremap <C-j> <C-W><C-J>\r
-nnoremap <C-k> <C-W><C-K>\r
-nnoremap <C-l> <C-W><C-L>\r
-\r
-" Maps leader-[h,j,k,l] to windows split navigations\r
-"nnoremap <leader>h <C-W><C-H>\r
-"nnoremap <leader>j <C-W><C-J>\r
-"nnoremap <leader>k <C-W><C-K>\r
-"nnoremap <leader>l <C-W><C-L>\r
-"\r
-"" Maps Ctrl-[h,j,k,l] to resizing a window split\r
-"nnoremap <C-H> <C-W><\r
-"nnoremap <C-J> <C-W>-\r
-"nnoremap <C-K> <C-W>+\r
-"nnoremap <C-L> <C-W>>\r
-\r
-"exit insert mode\r
-inoremap jj <esc>\r
-inoremap j<space> j\r
-" folding\r
-noremap <space> za\r
-" In the quickfix window, <CR> is used to jump to the error under the\r
-" cursor, so undefine the mapping there.\r
-autocmd BufReadPost quickfix nnoremap <buffer> <CR> <CR>\r
-\r
-" section: autocommands {{{1\r
-" --------------------------\r
-if has("autocmd")\r
- filetype plugin indent on\r
- autocmd bufnewfile,bufread *.md set filetype=markdown\r
- autocmd bufnewfile,bufread *.gradle set filetype=groovy\r
-endif " has("autocmd")\r
-" }}}1\r
-" section: visual {{{1\r
-" --------------------\r
-\r
-" switch syntax highlighting on, when the terminal has colors\r
-if (&t_Co > 2 || has("gui_running")) && has("syntax")\r
- if exists("&guifont")\r
- if has("mac")\r
- set guifont=monaco:h11\r
- elseif has("unix")\r
- set guifont=inconsolata\ 11\r
- elseif has("win32")\r
- set guifont=consolas:h11,courier\ new:h10\r
- endif\r
- endif\r
-\r
-\r
- if exists("syntax_on") || exists("syntax_manual")\r
- else\r
- syntax on\r
- endif\r
- set list\r
- if !exists('g:colors_name')\r
- silent! colorscheme solarized\r
- endif\r
-endif\r
-" }}}1\r
-\r
-if filereadable(expand('~/.vimrc_local'))\r
- source ~/.vimrc_local\r
-endif\r
-\r
+" section: environment {{{1
+" ---------------------
+
+if (empty(glob('~/.cache/vim/autoload/plug.vim')) ||
+ \ empty(glob('~/.local/share/vim/viminfo')))
+ cd ~
+ silent !mkdir -p .local/share/vim/{swap,backup,undo}
+ silent !mkdir -p .cache/vim/autoload
+ silent !curl -fLo .cache/vim/autoload/plug.vim
+ \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
+ autocmd VimEnter * PlugInstall | source $MYVIMRC
+ cd -
+endif
+
+set directory=~/.local/share/vim/swap
+set backupdir=~/.local/share/vim/backup
+set undodir=~/.local/share/vim/undo
+set viminfo+=n~/.local/share/vim/viminfo
+set runtimepath+=~/.cache/vim
+
+" section: plugins {{{1
+" ---------------------
+silent call plug#begin('~/.cache/vim/bundle')
+Plug 'tpope/vim-repeat'
+Plug 'tpope/vim-fugitive'
+Plug 'tpope/vim-surround'
+Plug 'tpope/vim-commentary'
+Plug 'tpope/vim-unimpaired'
+Plug 'tpope/vim-dispatch'
+"Plug 'tpope/vim-vinager'
+Plug 'scrooloose/syntastic'
+"Plug 'vim-airline/vim-airline'
+Plug 'airblade/vim-gitgutter'
+Plug 'majutsushi/tagbar'
+Plug 'fholgado/minibufexpl.vim'
+Plug 'brookhong/cscope.vim'
+Plug 'ctrlpvim/ctrlp.vim'
+Plug 'brandonbloom/csearch.vim'
+Plug 'mileszs/ack.vim'
+Plug 'jeetsukumaran/vim-filesearch'
+Plug 'haya14busa/incsearch.vim'
+Plug 'altercation/vim-colors-solarized'
+Plug 'editorconfig/editorconfig-vim'
+Plug 'johnsyweb/vim-makeshift'
+Plug 'tfnico/vim-gradle'
+"Plug 'a.vim'
+"Plug 'heaths/vim-msbuild'
+"Plug 'hdima/python-syntax'
+"Plug 'klen/python-mode'
+"Plug 'jalcine/cmake.vim'
+call plug#end()
+
+" section: options {{{1
+" ---------------------
+
+"set autoindent
+set autoread
+set autowrite " automatically save before commands like :next and :make
+set background=dark
+set backspace=2
+if exists('+breakindent')
+ set breakindent showbreak=\ +
+endif
+set cmdheight=2
+setglobal commentstring=#\ %s
+set complete-=i " searching includes can be slow
+"if has("win32") || has("win64")
+" does not work for msys2
+set clipboard=unnamed
+"else
+"set clipboard=unnamedplus
+"endif
+set fileformats=unix,dos,mac
+"set foldmethod=syntax
+"set foldlevel=1
+"set foldclose=all
+"set foldopen+=jump
+set guioptions+=a
+set history=200
+set incsearch " incremental search
+set laststatus=2 " always show status line
+set lazyredraw
+set linebreak
+set mouse=nvi
+set mousemodel=popup
+set number
+"set pastetoggle=<f2>
+set path=.,,**,C:\programs\IAR\\\ System\EWB_V850_V360\common\bin
+set printoptions=paper:letter
+set scrolloff=1
+set shiftround
+set shortmess=aoOtI
+"set showcmd " show (partial) command in status line.
+set showmatch " show matching brackets.
+set sidescrolloff=5
+set smartcase " case insensitive searches become sensitive with capitals
+"setglobal tags=./tags;
+set timeoutlen=500 " leader key timeout
+set ttimeoutlen=50 " make esc work faster
+set visualbell
+if exists('+undofile')
+ set undofile
+endif
+set virtualedit=block
+set updatetime=250
+set wildmenu
+set wildmode=longest:full,full
+set wildignore+=tags,.*.un~,*.pyc
+set winaltkeys=no
+
+"if !has("gui_running") && $display == '' || !has("gui")
+" set mouse=
+"endif
+"
+"set makeprg=cmake\ --build\ .
+" Visual studio 2013
+"set errorformat=\ %#%f(%l):\ %m
+" Visual studio 2008
+"set errorformat=%.%#>\ %#%f(%l)\ :\ %m
+"
+" IAR compiler
+set makeprg=vim-iarbuild.cmd
+set errorformat=%f(%l)\ :\ %m
+
+"syn match pythonDefStatement /^\s*\%(def\|class\)/
+" \ nextgroup=pythonFunction skipwhite
+"syn region pythonFunctionFold start="^\z(\s*\)\%(def\|class\)\>"
+" \ end="\ze\%(\s*\n\)\+\%(\z1\s\)\@!." fold transparent
+
+"hi link pythonDefStatement Statement
+
+let g:syntastic_quiet_messages = { "type": "style" }
+
+" plugin settings {{{1
+let g:netrw_liststyle=3
+let g:netrw_banner = 0
+let g:netrw_sort_sequence = '[\/]$,*'
+
+let g:solarized_menu=0
+let g:markdown_fenced_languages = ['html', 'python', 'bash=sh']
+let g:markdown_syntax_conceal = 0
+
+" %s is replaced with fzf command
+"let g:fzf_launcher = 'xterm -e bash -ic %s'
+"let g:fzf_launcher = "in_a_new_term_function %s"
+
+"for airline
+"let g:airline#extensions#tabline#enabled = 1
+
+let g:editorconfig_exclude_patterns = ['fugitive://.*', 'scp://.*']
+let g:editorconfig_verbose = 1
+
+if has("win32")
+ let g:EditorConfig_exec_path = "C:\programs\editorconfig\bin\editorconfig.exe"
+else
+ let g:editorconfig_core_mode = "python_builtin"
+endif
+
+set colorcolumn=80
+highlight ColorColumn ctermbg=9
+
+" block cursor in normal mode
+let &t_ti.="\e[1 q"
+let &t_SI.="\e[5 q"
+let &t_EI.="\e[1 q"
+let &t_te.="\e[0 q"
+
+let python_folding = 1
+" }}}2
+" section: commands {{{1
+"-----------------------
+
+if has("cscope")
+ set nocscopetag
+ set cscopequickfix=s-,c-,d-,i-,t-,e-
+ set nocscopeverbose
+ if filereadable(".git/cscope.out")
+ cscope add .git/cscope.out
+ endif
+ set cscopeverbose
+
+ function! Cscoperebuild()
+ cscope kill .git/cscope.out
+ silent execute "!./.git/hooks/cscope"
+ if v:shell_error
+ redraw!
+ echohl errormsg | echo "unable to run cscope command." | echohl none
+ else
+ if filereadable(".git/cscope.out")
+ redraw!
+ cscope add .git/cscope.out
+ else
+ redraw!
+ echohl errormsg | echo "unable to read cscope database." | echohl none
+ endif
+ endif
+ endfunction
+
+ command! Cscope call Cscoperebuild()
+endif"
+
+
+" section: mappings {{{1
+" ----------------------
+"
+let mapleader = ","
+
+
+" Quickly edit/reload the vimrc file
+nmap <silent> <leader>ev :e $MYVIMRC<CR>
+nmap <silent> <leader>sv :so $MYVIMRC<CR>
+
+" Minibufferexplorer
+nnoremap <Leader>b :MBEToggle<cr>
+"let g:miniBufExplMapWindowNavVim = 1
+"let g:miniBufExplMapCTabSwitchBufs = 1
+"
+" Tagbar
+nnoremap <Leader>t :TagbarToggle<CR>
+
+" copy/paste from system clipboard
+if has("win32")
+vnoremap <Leader>y "*y
+vnoremap <Leader>d "*d
+nnoremap <Leader>p "*p
+nnoremap <Leader>P "*P
+
+vnoremap <Leader>p "*p
+vnoremap <Leader>P "*P
+else
+" nnoremap <Leader>y "*y
+" nnoremap <Leader>p "*p
+" nnoremap <Leader>Y "+y
+" nnoremap <Leader>P "+p
+" nnoremap <Leader>y "*y
+" nnoremap <Leader>yy "*yy
+" noremap <Leader>p "*p
+" noremap <Leader>P "*P
+endif
+
+if has("cscope")
+" cnoreabbrev <expr> csa
+" \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs add' : 'csa')
+" cnoreabbrev <expr> csf
+" \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs find' : 'csf')
+" cnoreabbrev <expr> csk
+" \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs kill' : 'csk')
+" cnoreabbrev <expr> csr
+" \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs reset' : 'csr')
+" cnoreabbrev <expr> css
+" \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs show' : 'css')
+" cnoreabbrev <expr> csh
+" \ ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs help' : 'csh')
+
+ nnoremap <leader>fa :call CscopeFindInteractive(expand('<cword>'))<CR>
+ nnoremap <leader>l :call ToggleLocationList()<CR>
+
+ " s: Find this C symbol
+ nnoremap <leader>fs :call CscopeFind('s', expand('<cword>'))<CR>
+ " g: Find this definition
+ nnoremap <leader>fg :call CscopeFind('g', expand('<cword>'))<CR>
+ " d: Find functions called by this function
+ nnoremap <leader>fd :call CscopeFind('d', expand('<cword>'))<CR>
+ " c: Find functions calling this function
+ nnoremap <leader>fc :call CscopeFind('c', expand('<cword>'))<CR>
+ " t: Find this text string
+ nnoremap <leadpr>ft :call CscopeFind('t', expand('<cword>'))<CR>
+ " e: Find this egrep pattern
+ nnoremap <leader>fe :call CscopeFind('e', expand('<cword>'))<CR>
+ " f: Find this file
+ nnoremap <leader>ff :call CscopeFind('f', expand('<cword>'))<CR>
+ " i: Find files #including this file
+ nnoremap <leader>fi :call CscopeFind('i', expand('<cword>'))<CR>
+
+ "todo: figure out how to get cstag output in quickfix or a popup menu.
+ map <c-_> :cstag <c-r>=expand("<cword>")<cr><cr>
+endif
+
+" Maps Ctrl-[h,j,k,l] to windows split navigations
+nnoremap <C-h> <C-W><C-H>
+nnoremap <C-j> <C-W><C-J>
+nnoremap <C-k> <C-W><C-K>
+nnoremap <C-l> <C-W><C-L>
+
+" Maps leader-[h,j,k,l] to windows split navigations
+"nnoremap <leader>h <C-W><C-H>
+"nnoremap <leader>j <C-W><C-J>
+"nnoremap <leader>k <C-W><C-K>
+"nnoremap <leader>l <C-W><C-L>
+"
+"" Maps Ctrl-[h,j,k,l] to resizing a window split
+"nnoremap <C-H> <C-W><
+"nnoremap <C-J> <C-W>-
+"nnoremap <C-K> <C-W>+
+"nnoremap <C-L> <C-W>>
+
+"exit insert mode
+inoremap jj <esc>
+inoremap j<space> j
+" folding
+noremap <space> za
+" In the quickfix window, <CR> is used to jump to the error under the
+" cursor, so undefine the mapping there.
+autocmd BufReadPost quickfix nnoremap <buffer> <CR> <CR>
+
+" section: autocommands {{{1
+" --------------------------
+if has("autocmd")
+ filetype plugin indent on
+ autocmd bufnewfile,bufread *.md set filetype=markdown
+ autocmd bufnewfile,bufread *.gradle set filetype=groovy
+endif " has("autocmd")
+" }}}1
+" section: visual {{{1
+" --------------------
+
+" switch syntax highlighting on, when the terminal has colors
+if (&t_Co > 2 || has("gui_running")) && has("syntax")
+ if exists("&guifont")
+ if has("mac")
+ set guifont=monaco:h11
+ elseif has("unix")
+ set guifont=inconsolata\ 11
+ elseif has("win32")
+ set guifont=consolas:h11,courier\ new:h10
+ endif
+ endif
+
+
+ if exists("syntax_on") || exists("syntax_manual")
+ else
+ syntax on
+ endif
+ set list
+ if !exists('g:colors_name')
+ silent! colorscheme solarized
+ endif
+endif
+" }}}1
+
+if filereadable(expand('~/.vimrc_local'))
+ source ~/.vimrc_local
+endif
+
-# dotfiles\r
-\r
-What you need to do on the new box is this:\r
- \r
- $ cd $HOME\r
- $ git init --bare $HOME/.dotfiles\r
- $ alias dot='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'\r
- $ dot config --local status.showUntrackedFiles no\r
- $ dot remote add origin git@bitbucket.org:jannikz/dotfiles.git\r
- $ dot fetch\r
- $ dot reset --hard origin/master\r
+# dotfiles
+
+What you need to do on the new box is this:
+
+ $ cd $HOME
+ $ git init --bare $HOME/.dotfiles
+ $ alias dot='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
+ $ dot config --local status.showUntrackedFiles no
+ $ dot remote add origin git@bitbucket.org:jannikz/dotfiles.git
+ $ dot fetch
+ $ dot reset --hard origin/master
$ dot branch -u origin/master
\ No newline at end of file
+++ /dev/null
-Windows Registry Editor Version 5.00\r
-\r
-; Registry file that maps the solarized palette to the 16 avaliable colors\r
-; in a Windows command prompt. Note, hex values in the table are RGB but byte\r
-; ordering of a DWORD is BGR, e.g. "ColorTable<##>"=dword:00<B><G><R>\r
-;\r
-; Solarized color table from http://ethanschoonover.com/solarized.\r
-;\r
-; NR cmd.exe PowerShell SOLARIZED HEX DWORD\r
-; -- ------- ----------- --------- ------- --------\r
-; 00 Black Black base03 #002b36 00362b00\r
-; 01 Blue DarkBlue base0 #839496 00969483\r
-; 02 Green DarkGreen base01 #586e75 00756e58\r
-; 03 Aqua DarkCyan base1 #93a1a1 00a1a193\r
-; 04 Red DarkRed orange #cb4b16 00164bcb\r
-; 05 Purple DarkMagenta violet #6c71c4 00c4716c\r
-; 06 Yellow DarkYellow base00 #657b83 00837b65\r
-; 07 White Gray base2 #eee8d5 00d5e8ee\r
-; 08 Gray DarkGray base02 #073642 00423607\r
-; 09 LightBlue Blue blue #268bd2 00d28b26\r
-; 10 LightGreen Green green #859900 00009985\r
-; 11 LightAqua Cyan cyan #2aa198 0098a12a\r
-; 12 LightRed Red red #dc322f 002f32dc\r
-; 13 LightPurple Magenta magenta #d33682 008236d3\r
-; 14 LightYellow Yellow yellow #b58900 000089b5\r
-; 15 BrightWhite White base3 #fdf6e3 00e3f6fd\r
-;\r
-\r
-[HKEY_CURRENT_USER\Console]\r
-"ColorTable00"=dword:00362b00\r
-"ColorTable01"=dword:00969483\r
-"ColorTable02"=dword:00756e58\r
-"ColorTable03"=dword:00a1a193\r
-"ColorTable04"=dword:00164bcb\r
-"ColorTable05"=dword:00c4716c\r
-"ColorTable06"=dword:00837b65\r
-"ColorTable07"=dword:00d5e8ee\r
-"ColorTable08"=dword:00423607\r
-"ColorTable09"=dword:00d28b26\r
-"ColorTable10"=dword:00009985\r
-"ColorTable11"=dword:0098a12a\r
-"ColorTable12"=dword:002f32dc\r
-"ColorTable13"=dword:008236d3\r
-"ColorTable14"=dword:000089b5\r
-"ColorTable15"=dword:00e3f6fd\r
-"ScreenColors"=dword:00000001\r
-"PopupColors"=dword:000000f6\r
+++ /dev/null
-; Use caps and rwin as ctrl (HHKB alike)\r
-Capslock::LCtrl\r
-RWin::RCtrl\r
-LWin::return\r
-\r
-; Letter a -> skandinavian å\r
-:*?:``a::å\r
-:*?:``A::Å\r
-\r
-; Letter o -> danish/norwegen ø\r
-:*?:``o::ø\r
-:*?:``O::Ø\r
-\r
-; Letter e -> danish/norwegen æ\r
-:*?:``e::æ\r
-:*?:``E::Æ\r
-\r
-; Letter u -> swedish/finish ö\r
-:*?:``u::ö\r
-:*?:``U::Ö\r
-\r
-; Letter ' -> swedish/finish ä\r
-:*?:``'::ä\r
-:*?:``"::Ä\r