Merge branch 'master' of github.com:holtrop/files

This commit is contained in:
Josh Holtrop 2010-11-17 21:06:35 -05:00
commit e2bf72f2e5
4 changed files with 22 additions and 4 deletions

View File

@ -1,5 +1,9 @@
# vim:syntax=sh
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'

4
grepdefine Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
define="$1"
exec grep --exclude-dir .svn --color=auto -R "define *\\<${define}\\>" .

4
grepid Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
id="$1"
exec grep --exclude-dir .svn --color=auto -R '\<'"${id}"'\>' .

10
vimrc
View File

@ -109,10 +109,14 @@ set background=dark
set showtabline=2
if has("gui_running")
colorscheme ir_black
runtime ftplugin/man.vim
nmap K :Man <cword><CR>
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