diff --git a/bash_aliases b/bash_aliases index 843003d..a356366 100644 --- a/bash_aliases +++ b/bash_aliases @@ -1,5 +1,9 @@ # vim:syntax=sh -PS1='\[\033[32;1m\]\u@\H\[\033[31;1m\] [\w]\[\033[35;1m\] \d \t \[\033[34;1m\](\j)\n\$ \[\033[0m\]' +if [[ "`whoami`" == "root" ]]; then + PS1='\[\033[31;1m\]\u@\H\[\033[32;1m\] [\w]\[\033[35;1m\] \d \t \[\033[34;1m\](\j)\n\$ \[\033[0m\]' +else + PS1='\[\033[32;1m\]\u@\H\[\033[31;1m\] [\w]\[\033[35;1m\] \d \t \[\033[34;1m\](\j)\n\$ \[\033[0m\]' +fi # alternate PS1: # PS1='[\[\033[31;1m\]\u@\H\[\033[34;1m\] \w\[\033[0m\]]\$ \[\033[0m\]' case "$TERM" in @@ -32,5 +36,7 @@ function svn-merge-branch() branch_rev=$(svn log --stop-on-copy `svn-root`/branches/"$branch_name" | egrep -A1 -- '-{50}' | egrep '^r[0-9]+' | tail -n 1 | sed -re 's/^r([0-9]+).*/\1/') svn merge -r${branch_rev}:HEAD `svn-root`/branches/"$branch_name" "$@" } +alias cribbage='cribbage -r' +alias backgammon='backgammon -r -pb' # put 'cattodo' in $PROMPT_COMMAND to use alias cattodo='if [[ $LAST_WD != $PWD ]]; then if [[ -r .todo ]]; then cat .todo; fi; LAST_WD=$PWD; fi' diff --git a/grepdefine b/grepdefine new file mode 100755 index 0000000..15584aa --- /dev/null +++ b/grepdefine @@ -0,0 +1,4 @@ +#!/bin/sh + +define="$1" +exec grep --exclude-dir .svn --color=auto -R "define *\\<${define}\\>" . diff --git a/grepid b/grepid new file mode 100755 index 0000000..d6e5520 --- /dev/null +++ b/grepid @@ -0,0 +1,4 @@ +#!/bin/sh + +id="$1" +exec grep --exclude-dir .svn --color=auto -R '\<'"${id}"'\>' . diff --git a/vimrc b/vimrc index bb20444..81f6759 100644 --- a/vimrc +++ b/vimrc @@ -109,10 +109,14 @@ set background=dark set showtabline=2 if has("gui_running") + colorscheme ir_black runtime ftplugin/man.vim nmap K :Man set lines=38 map ,w :winpos 769 153 + if &diff + set columns=175 + endif endif " mappings @@ -141,9 +145,9 @@ set nomousehide if has("autocmd") autocmd FileType text setlocal noautoindent - autocmd FileType c match error /\v\s+$/ - autocmd FileType c 2match error /\t/ - autocmd FileType cpp 2match error /\t/ +" autocmd FileType c match error /\v\s+$/ +" autocmd FileType c 2match error /\t/ +" autocmd FileType cpp 2match error /\t/ autocmd FileType c syn match Constant display "\<_*[A-Z][A-Z0-9_]*\>" autocmd FileType cpp syn match Constant display "\<_*[A-Z][A-Z0-9_]*\>" autocmd FileType dosbatch syn match Comment "^@rem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument