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

View file

@ -5,7 +5,7 @@
" Version: VCS development
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
" License:
" Copyright (c) 2007 Bob Hiestand
" Copyright (c) 2008 Bob Hiestand
"
" Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to
@ -40,6 +40,10 @@
" Section: Plugin header {{{1
if exists('VCSCommandDisableAll')
finish
endif
if v:version < 700
echohl WarningMsg|echomsg 'VCSCommand requires at least VIM 7.0'|echohl None
finish
@ -221,7 +225,7 @@ function! s:gitFunctions.Review(argList)
let revision = a:argList[0]
endif
let oldCwd = VCSCommandChangeToCurrentFileDir(resolve(bufname('%')))
let oldCwd = VCSCommandChangeToCurrentFileDir(resolve(bufname(VCSCommandGetOriginalBuffer('%'))))
try
let prefix = system(VCSCommandGetOption('VCSCommandGitExec', 'git') . ' rev-parse --show-prefix')
finally
@ -229,7 +233,7 @@ function! s:gitFunctions.Review(argList)
endtry
let prefix = substitute(prefix, '\n$', '', '')
let blob = revision . ':' . prefix . '<VCSCOMMANDFILE>'
let blob = '"' . revision . ':' . prefix . '<VCSCOMMANDFILE>"'
let resultBuffer = s:DoCommand('show ' . blob, 'review', revision, {})
if resultBuffer > 0
let &filetype=getbufvar(b:VCSCommandOriginalBuffer, '&filetype')
@ -239,7 +243,7 @@ endfunction
" Function: s:gitFunctions.Status(argList) {{{2
function! s:gitFunctions.Status(argList)
return s:DoCommand(join(['status'] + a:argList), 'log', join(a:argList), {'allowNonZeroExit': 1})
return s:DoCommand(join(['status'] + a:argList), 'status', join(a:argList), {'allowNonZeroExit': 1})
endfunction
" Function: s:gitFunctions.Update(argList) {{{2
@ -247,6 +251,8 @@ function! s:gitFunctions.Update(argList)
throw "This command is not implemented for git because file-by-file update doesn't make much sense in that context. If you have an idea for what it should do, please let me know."
endfunction
" Annotate setting {{{2
let s:gitFunctions.AnnotateSplitRegex = ') '
" Section: Plugin Registration {{{1
call VCSCommandRegisterModule('git', expand('<sfile>'), s:gitFunctions, [])