Snippets and vim updates and such, oh my

git-svn-id: http://photonzero.com/dotfiles/trunk@33 23f722f6-122a-0410-8cef-c75bd312dd78
This commit is contained in:
michener 2010-02-05 00:42:50 +00:00
parent a0995d6be5
commit 9d2548e8a9
56 changed files with 13433 additions and 129 deletions

47
.vimrc
View file

@ -38,6 +38,8 @@ let g:Tb_MaxSize=0
let g:Tb_MapCTabSwitchBufs = 1
au Filetype html,xml,xsl source ~/.vim/closetag.vim
"filetype plugin on
"MiniBufExplore Options
"let g:miniBufExplMapWindowNavVim = 1
@ -58,6 +60,7 @@ set t_Sb=ESC[4%dm
"nnoremap gK :tabclose<CR>
"nnoremap gn gt
"nnoremap gp gT
nmap gt :NERDTreeToggle<CR>
nnoremap gK :bdelete<CR>
nnoremap gn :bn<CR>
nnoremap gp :bp<CR>
@ -66,19 +69,19 @@ nnoremap gw g*
nmap P o<Esc>p
nnoremap j gj
nnoremap k gk
vnoremap j gj
vnoremap k gk
xnoremap j gj
xnoremap k gk
nnoremap <Down> gj
nnoremap <Up> gk
vnoremap <Down> gj
vnoremap <Up> gk
xnoremap <Down> gj
xnoremap <Up> gk
inoremap <Down> <C-o>gj
inoremap <Up> <C-o>gk
"nnoremap <C-i> <C-a>
nnoremap <C-a> ^
nnoremap <C-e> $
vnoremap <C-a> ^
vnoremap <C-e> $
xnoremap <C-a> ^
xnoremap <C-e> $
inoremap <C-a> <C-O>^
inoremap <C-e> <C-O>$
imap <C-c> <Esc>
@ -136,3 +139,35 @@ com! DiffSaved call s:DiffWithSaved()
"inoremap ;a <esc>
"cd /mw/barak/gd-es-bug
"
function! Find(name)
let l:_name = substitute(a:name, "\\s", "*", "g")
"let l:list=system("find . -iname '*".l:_name."*' -not -name \"*.class\" -and -not -name \"*.swp\" | perl -ne 'print \"$.\\t$_\"'")
let l:list=system("find . -path \"*/.svn\" -prune -o -iname '*".l:_name."*' -not -name \"*.class\" -and -not -name \"*.swp\" -print | perl -ne 'print \"$.\\t$_\"'")
let l:num=strlen(substitute(l:list, "[^\n]", "", "g"))
if l:num < 1
echo "'".a:name."' not found"
return
endif
if l:num != 1
echo l:list
let l:input=input("Which ? (<enter>=nothing)\n")
if strlen(l:input)==0
return
endif
if strlen(substitute(l:input, "[0-9]", "", "g"))>0
echo "Not a number"
return
endif
if l:input<1 || l:input>l:num
echo "Out of range"
return
endif
let l:line=matchstr("\n".l:list, "\n".l:input."\t[^\n]*")
else
let l:line=l:list
endif
let l:line=substitute(l:line, "^[^\t]*\t./", "", "")
execute ":e ".l:line
endfunction
command! -nargs=1 Find :call Find("<args>")