diff --git a/bash_aliases b/bash_aliases index 66980ea..d9ebc2e 100755 --- a/bash_aliases +++ b/bash_aliases @@ -110,6 +110,8 @@ function git-config-joshs() git config --global alias.gdiff 'difftool -y -t gvimdiff' git config --global alias.gdiffc 'difftool -y -t gvimdiff --cached' git config --global alias.wdiff 'diff --word-diff=color' + git config --global alias.mktar '!function f { name="$1"; pos="$2"; if [ "$pos" == "" ]; then pos=HEAD; fi; git archive --prefix="$name"/ "$pos" | bzip2 > ../"$name".tar.bz2; }; f' + git config --global push.default tracking if [ -e /bin/cygwin1.dll ]; then git config --global alias.bcdiff 'difftool -y -t bc2' git config --global alias.bcdiffc 'difftool -y -t bc2 --cached' @@ -129,6 +131,14 @@ alias jindent='indent -bbo -bl -blf -bli0 -bls -i4 -npcs -nut -ts8' # cygwin-specific aliases if [ -e /bin/cygwin1.dll ]; then alias ip="ipconfig | grep -E 'IP(v4)? Address' | sed -e 's/.*: //'" + function cs + { + while [ "$1" != "" ] + do + cygstart "$1" + shift + done + } fi # source any machine-local aliases diff --git a/vimrc b/vimrc old mode 100644 new mode 100755 index 562bfec..e095067 --- a/vimrc +++ b/vimrc @@ -51,6 +51,7 @@ set incsearch set tags=./tags;/ let Tlist_WinWidth = 40 set grepprg=internal +set tabpagemax=999 " GUI settings set background=dark @@ -78,9 +79,8 @@ end " mappings map ,# :set paste O75A#yypO#73A A#0ll:set nopaste R map ,p :set paste o#73A A#0ll:set nopaste R -map ,* :set paste O/74A*o *72A A*o 73A*A/0klll:set nopaste R +map ,* :set paste O/74A*o 73A*A/O * :set nopaste A map ,; :set paste O;74A*o;*72A A*o;74A*0klll:set nopaste R -map ,c :set paste o *72A A*0lll:set nopaste R map ,8 :set paste o20A-A8<20A-:set nopaste 0 map ,m mz:%s/ //g :noh 'z map ,t :tabn @@ -122,3 +122,28 @@ if has("autocmd") autocmd FileType html set sw=2 ts=2 sts=2 autocmd FileType xhtml set sw=2 ts=2 sts=2 endif " has("autocmd") + +if !exists('s:loaded') + s:loaded = 0 +endif + +if s:loaded + delfunction Bwmatch + delcommand Bwmatch +endif + +function Bwmatch(exp) + let last = bufnr('$') + let index = 0 + while index <= last + if bufexists(index) && bufname(index) =~ a:exp + execute ':bw ' . index + endif + let index += 1 + endwhile + redraw! +endfunction + +command -nargs=1 Bwmatch :call Bwmatch('') + +let s:loaded = 1