No subject
Sat Feb 16 10:43:46 UTC 2008
added it directly to vim-runtime instead of vim-scripts because the
latter is too vim.org-specific and Bram has already accepted v1.1 of
vim-git into vim 7.2.
Added:
trunk/packages/vim/runtime/doc/
trunk/packages/vim/runtime/doc/ft-gitcommit-plugin.txt
trunk/packages/vim/runtime/ftdetect/
trunk/packages/vim/runtime/ftdetect/git.vim
trunk/packages/vim/runtime/ftplugin/gitcommit.vim
trunk/packages/vim/runtime/ftplugin/gitconfig.vim
trunk/packages/vim/runtime/ftplugin/gitrebase.vim
trunk/packages/vim/runtime/ftplugin/gitsendemail.vim
trunk/packages/vim/runtime/indent/
trunk/packages/vim/runtime/indent/gitconfig.vim
trunk/packages/vim/runtime/syntax/gitcommit.vim
trunk/packages/vim/runtime/syntax/gitconfig.vim
trunk/packages/vim/runtime/syntax/gitrebase.vim
trunk/packages/vim/runtime/syntax/gitsendemail.vim
Modified:
trunk/packages/vim/debian/changelog
Modified: trunk/packages/vim/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/changelog?rev=1212&op=diff
==============================================================================
--- trunk/packages/vim/debian/changelog (original)
+++ trunk/packages/vim/debian/changelog Thu Feb 21 16:05:07 2008
@@ -1,5 +1,6 @@
vim (1:7.1-257+1) UNRELEASED; urgency=low
+ [ James Vega ]
* New upstream patches (246 - 257), see README.gz for details.
* debian/control:
- Build-Depend on tcl-dev instead of tcl8.4-dev per Tcl/Tk policy.
@@ -13,7 +14,10 @@
* debian/rules:
- Add a get-orig-source target.
- -- James Vega <jamessan at debian.org> Mon, 11 Feb 2008 10:56:53 -0500
+ [ martin f. krafft ]
+ * add Tim Pope's vim-git integration (v1.1, commit a53cabb) to vim-runtime.
+
+ -- martin f. krafft <madduck at debian.org> Thu, 21 Feb 2008 17:00:37 +0100
vim (1:7.1-245+1) unstable; urgency=low
Added: trunk/packages/vim/runtime/doc/ft-gitcommit-plugin.txt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/runtime/doc/ft-gitcommit-plugin.txt?rev=1212&op=file
==============================================================================
--- trunk/packages/vim/runtime/doc/ft-gitcommit-plugin.txt (added)
+++ trunk/packages/vim/runtime/doc/ft-gitcommit-plugin.txt Thu Feb 21 16:05:07 2008
@@ -1,0 +1,5 @@
+GIT COMMIT *ft-gitcommit-plugin*
+
+One command, :GitDiffCached, is provided to show a diff of the current commit
+in the preview window. It is equivalent to calling "git diff --cached" plus
+any arguments given to the command.
Added: trunk/packages/vim/runtime/ftdetect/git.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/runtime/ftdetect/git.vim?rev=1212&op=file
==============================================================================
--- trunk/packages/vim/runtime/ftdetect/git.vim (added)
+++ trunk/packages/vim/runtime/ftdetect/git.vim Thu Feb 21 16:05:07 2008
@@ -1,0 +1,10 @@
+augroup FTgit
+ autocmd!
+ autocmd BufNewFile,BufRead *.git/COMMIT_EDITMSG set ft=gitcommit
+ autocmd BufNewFile,BufRead *.git/config,.gitconfig set ft=gitconfig
+ autocmd BufNewFile,BufRead git-rebase-todo set ft=gitrebase
+ autocmd BufNewFile,BufRead .msg.[0-9]*
+ \ if getline(1) =~ '^From.*# This line is ignored.$' |
+ \ set ft=gitsendemail |
+ \ endif
+augroup END
Added: trunk/packages/vim/runtime/ftplugin/gitcommit.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/runtime/ftplugin/gitcommit.vim?rev=1212&op=file
==============================================================================
--- trunk/packages/vim/runtime/ftplugin/gitcommit.vim (added)
+++ trunk/packages/vim/runtime/ftplugin/gitcommit.vim Thu Feb 21 16:05:07 2008
@@ -1,0 +1,77 @@
+" Vim filetype plugin
+" Language: git config file
+" Maintainer: Tim Pope <vimNOSPAM at tpope.info>
+" Last Change: 2007 Dec 16
+
+" Only do this when not done yet for this buffer
+if (exists("b:did_ftplugin"))
+ finish
+endif
+let b:did_ftplugin = 1
+
+" allow gf to work even if in a subdirectory
+let b:git_dir = expand("%:p:h")
+let &l:path = fnamemodify(b:git_dir,':h').",".&l:path
+let b:undo_ftplugin = "setl path<"
+
+if &textwidth == 0
+ " make sure that log messages play nice with git-log on standard terminals
+ setlocal textwidth=72
+ let b:undo_ftplugin = b:undo_ftplugin . " tw<"
+endif
+
+if exists("g:no_gitcommit_commands")
+ finish
+endif
+
+" Automatically diffing can be done with:
+" autocmd FileType gitcommit DiffGitCached | wincmd p
+command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
+
+function! s:diffcomplete(A,L,P)
+ let args = ""
+ if a:P <= match(a:L." -- "," -- ")+3
+ let args = args . "-p\n--stat\n--shortstat\n--summary\n--patch-with-stat\n--no-renames\n-B\n-M\n-C\n"
+ end
+ if exists("b:git_dir") && a:A !~ '^-'
+ let tree = fnamemodify(b:git_dir,':h')
+ if strpart(getcwd(),0,strlen(tree)) == tree
+ let args = args."\n".system("git diff --cached --name-only")
+ endif
+ endif
+ return args
+endfunction
+
+function! s:gitdiffcached(bang,gitdir,...)
+ let tree = fnamemodify(a:gitdir,':h')
+ let name = tempname()
+ let prefix = ""
+ if strpart(getcwd(),0,strlen(tree)) != tree
+ if has("win32")
+ let oldgit = $GIT_DIR
+ let $GIT_DIR = a:gitdir
+ else
+ " Can't unset an env var, so use shell syntax instead
+ let prefix = 'GIT_DIR='.shellescape(a:gitdir).' '
+ endif
+ endif
+ if a:0
+ let extra = join(map(copy(a:000),has("*shellescape") ? 'shellescape(v:val)' : "'\"'.v:val.'\"'"))
+ else
+ let extra = "-p --stat=".&columns
+ endif
+ call system(prefix."git diff --cached --no-color ".extra." > ".name)
+ if exists("l:oldgit")
+ let $GIT_DIR = oldgit
+ endif
+ exe "pedit ".name
+ wincmd P
+ let b:git_dir = a:gitdir
+ command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
+ nnoremap <silent> q :q<CR>
+ setlocal buftype=nowrite nobuflisted noswapfile nomodifiable filetype=diff
+ setlocal keywordprg=git\ show includeexpr=substitute(v:fname,'^[ab]/','','')
+ if strpart(&l:path,0,strlen(tree)) != tree
+ let &l:path = tree.','.&l:path
+ endif
+endfunction
Added: trunk/packages/vim/runtime/ftplugin/gitconfig.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/runtime/ftplugin/gitconfig.vim?rev=1212&op=file
==============================================================================
--- trunk/packages/vim/runtime/ftplugin/gitconfig.vim (added)
+++ trunk/packages/vim/runtime/ftplugin/gitconfig.vim Thu Feb 21 16:05:07 2008
@@ -1,0 +1,15 @@
+" Vim filetype plugin
+" Language: git config file
+" Maintainer: Tim Pope <vimNOSPAM at tpope.info>
+" Last Change: 2007 Dec 16
+
+" Only do this when not done yet for this buffer
+if (exists("b:did_ftplugin"))
+ finish
+endif
+let b:did_ftplugin = 1
+
+setlocal formatoptions-=t formatoptions+=croql
+setlocal comments=:#,:; commentstring=;\ %s
+
+let b:undo_ftplugin = "setl fo< com< cms<"
Added: trunk/packages/vim/runtime/ftplugin/gitrebase.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/runtime/ftplugin/gitrebase.vim?rev=1212&op=file
==============================================================================
--- trunk/packages/vim/runtime/ftplugin/gitrebase.vim (added)
+++ trunk/packages/vim/runtime/ftplugin/gitrebase.vim Thu Feb 21 16:05:07 2008
@@ -1,0 +1,14 @@
+" Vim filetype plugin
+" Language: git rebase --interactive
+" Maintainer: Tim Pope <vimNOSPAM at tpope.info>
+" Last Change: 2008 Feb 14
+
+" Only do this when not done yet for this buffer
+if (exists("b:did_ftplugin"))
+ finish
+endif
+let b:did_ftplugin = 1
+
+setlocal comments=:# commentstring=#\ %s formatoptions-=t
+setlocal keywordprg=git\ show
+let b:undo_ftplugin = "setl com< cms< fo< keywordprg<"
Added: trunk/packages/vim/runtime/ftplugin/gitsendemail.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/runtime/ftplugin/gitsendemail.vim?rev=1212&op=file
==============================================================================
--- trunk/packages/vim/runtime/ftplugin/gitsendemail.vim (added)
+++ trunk/packages/vim/runtime/ftplugin/gitsendemail.vim Thu Feb 21 16:05:07 2008
@@ -1,0 +1,6 @@
+" Vim filetype plugin
+" Language: git send-email message
+" Maintainer: Tim Pope <vimNOSPAM at tpope.info>
+" Last Change: 2007 Dec 16
+
+runtime! ftplugin/mail.vim
Added: trunk/packages/vim/runtime/indent/gitconfig.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/runtime/indent/gitconfig.vim?rev=1212&op=file
==============================================================================
--- trunk/packages/vim/runtime/indent/gitconfig.vim (added)
+++ trunk/packages/vim/runtime/indent/gitconfig.vim Thu Feb 21 16:05:07 2008
@@ -1,0 +1,35 @@
+" Vim indent file
+" Language: git config file
+" Maintainer: Tim Pope <vimNOSPAM at tpope.info>
+" Last Change: 2007 Dec 16
+
+if exists("b:did_indent")
+ finish
+endif
+let b:did_indent = 1
+
+setlocal autoindent
+setlocal indentexpr=GetGitconfigIndent()
+setlocal indentkeys=o,O,*<Return>,0[,],0;,0#,=,!^F
+
+" Only define the function once.
+if exists("*GetGitconfigIndent")
+ finish
+endif
+
+function! GetGitconfigIndent()
+ let line = getline(v:lnum-1)
+ let cline = getline(v:lnum)
+ if line =~ '[^\\]\@<=\%(\\\\\)*\\$'
+ " odd number of slashes, in a line continuation
+ return -1
+ elseif cline =~ '^\s*\['
+ return 0
+ elseif cline =~ '^\s*\a'
+ return &sw
+ elseif cline == '' && line =~ '^\['
+ return &sw
+ else
+ return -1
+ endif
+endfunction
Added: trunk/packages/vim/runtime/syntax/gitcommit.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/runtime/syntax/gitcommit.vim?rev=1212&op=file
==============================================================================
--- trunk/packages/vim/runtime/syntax/gitcommit.vim (added)
+++ trunk/packages/vim/runtime/syntax/gitcommit.vim Thu Feb 21 16:05:07 2008
@@ -1,0 +1,52 @@
+" Vim syntax file
+" Language: git commit file
+" Maintainer: Tim Pope <vimNOSPAM at tpope.info>
+" Filenames: *.git/COMMIT_EDITMSG
+" Last Change: 2007 Dec 16
+
+if exists("b:current_syntax")
+ finish
+endif
+
+syn case match
+syn sync minlines=50
+
+if has("spell")
+ syn spell toplevel
+endif
+
+syn match gitcommitFirstLine "\%^[^#].*" nextgroup=gitcommitBlank skipnl
+syn match gitcommitSummary "^.\{0,50\}" contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell
+syn match gitcommitOverflow ".*" contained contains=@Spell
+syn match gitcommitBlank "^[^#].*" contained contains=@Spell
+syn match gitcommitComment "^#.*"
+syn region gitcommitHead start=/^# / end=/^#$/ contained transparent
+syn match gitcommitOnBranch "\%(^# \)\@<=On branch" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite
+syn match gitcommitBranch "\S\+" contained
+syn match gitcommitHeader "\%(^# \)\@<=.*:$" contained containedin=gitcommitComment
+
+syn region gitcommitUntracked start=/^# Untracked files:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUntrackedFile fold
+syn match gitcommitUntrackedFile "\t\@<=.*" contained
+
+syn region gitcommitDiscarded start=/^# Changed but not updated:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitType fold
+syn region gitcommitSelected start=/^# Changes to be committed:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitType fold
+
+syn match gitcommitType "\t\@<=[a-z][a-z ]*[a-z]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitFile skipwhite
+syn match gitcommitFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitArrow
+syn match gitcommitArrow " -> " contained nextgroup=gitcommitFile transparent
+
+hi def link gitcommitSummary Keyword
+hi def link gitcommitComment Comment
+hi def link gitcommitUntracked gitcommitComment
+hi def link gitcommitDiscarded gitcommitComment
+hi def link gitcommitSelected gitcommitComment
+hi def link gitcommitOnBranch Comment
+hi def link gitcommitBranch Special
+hi def link gitcommitType Type
+hi def link gitcommitHeader PreProc
+hi def link gitcommitFile Constant
+hi def link gitcommitUntrackedFile gitcommitFile
+"hi def link gitcommitOverflow Error
+hi def link gitcommitBlank Error
+
+let b:current_syntax = "gitcommit"
Added: trunk/packages/vim/runtime/syntax/gitconfig.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/runtime/syntax/gitconfig.vim?rev=1212&op=file
==============================================================================
--- trunk/packages/vim/runtime/syntax/gitconfig.vim (added)
+++ trunk/packages/vim/runtime/syntax/gitconfig.vim Thu Feb 21 16:05:07 2008
@@ -1,0 +1,37 @@
+" Vim syntax file
+" Language: git config file
+" Maintainer: Tim Pope <vimNOSPAM at tpope.info>
+" Filenames: gitconfig, .gitconfig, *.git/config
+" Last Change: 2007 Dec 16
+
+if exists("b:current_syntax")
+ finish
+endif
+
+syn case ignore
+setlocal iskeyword+=-
+setlocal iskeyword-=_
+
+syn match gitconfigComment "[#;].*"
+syn match gitconfigSection "\%(^\s*\)\@<=\[[a-z0-9.-]\+\]"
+syn match gitconfigSection '\%(^\s*\)\@<=\[[a-z0-9.-]\+ \+\"\%([^\\"]\|\\.\)*"\]'
+syn match gitconfigVariable "\%(^\s*\)\@<=\a\k*\%(\s*\%([=#;]\|$\)\)\@=" nextgroup=gitconfigAssignment skipwhite
+syn region gitconfigAssignment matchgroup=gitconfigNone start=+=\s*+ skip=+\\+ end=+\s*$+ contained contains=gitconfigBoolean,gitconfigNumber,gitConfigString,gitConfigEscape,gitConfigError,gitconfigComment keepend
+syn keyword gitconfigBoolean true false yes no contained
+syn match gitconfigNumber "\d\+" contained
+syn region gitconfigString matchgroup=gitconfigDelim start=+"+ skip=+\\+ end=+"+ matchgroup=gitconfigError end=+[^\\"]\%#\@!$+ contained contains=gitconfigEscape,gitconfigEscapeError
+syn match gitconfigError +\\.+ contained
+syn match gitconfigEscape +\\[\\"ntb]+ contained
+syn match gitconfigEscape +\\$+ contained
+
+hi def link gitconfigComment Comment
+hi def link gitconfigSection Keyword
+hi def link gitconfigVariable Identifier
+hi def link gitconfigBoolean Boolean
+hi def link gitconfigNumber Number
+hi def link gitconfigString String
+hi def link gitconfigDelim Delimiter
+hi def link gitconfigEscape Delimiter
+hi def link gitconfigError Error
+
+let b:current_syntax = "gitconfig"
Added: trunk/packages/vim/runtime/syntax/gitrebase.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/runtime/syntax/gitrebase.vim?rev=1212&op=file
==============================================================================
--- trunk/packages/vim/runtime/syntax/gitrebase.vim (added)
+++ trunk/packages/vim/runtime/syntax/gitrebase.vim Thu Feb 21 16:05:07 2008
@@ -1,0 +1,29 @@
+" Vim syntax file
+" Language: git rebase --interactive
+" Maintainer: Tim Pope <vimNOSPAM at tpope.info>
+" Filenames: git-rebase-todo
+
+if exists("b:current_syntax")
+ finish
+endif
+
+syn case match
+syn sync minlines=10
+
+syn match gitrebaseHash "\v<\x{7,40}>" contained
+syn match gitrebaseCommit "\v<\x{7,40}>" nextgroup=gitrebaseSummary skipwhite
+syn match gitrebasePick "\v^p%(ick)=>" nextgroup=gitrebaseCommit skipwhite
+syn match gitrebaseEdit "\v^e%(dit)=>" nextgroup=gitrebaseCommit skipwhite
+syn match gitrebaseSquash "\v^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite
+syn match gitrebaseSummary ".*" contains=gitrebaseHash contained
+syn match gitrebaseComment "^#.*" contains=gitrebaseHash
+
+hi def link gitrebaseCommit gitrebaseHash
+hi def link gitrebaseHash Identifier
+hi def link gitrebasePick Statement
+hi def link gitrebaseEdit PreProc
+hi def link gitrebaseSquash Type
+hi def link gitrebaseSummary String
+hi def link gitrebaseComment Comment
+
+let b:current_syntax = "gitrebase"
Added: trunk/packages/vim/runtime/syntax/gitsendemail.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/runtime/syntax/gitsendemail.vim?rev=1212&op=file
==============================================================================
--- trunk/packages/vim/runtime/syntax/gitsendemail.vim (added)
+++ trunk/packages/vim/runtime/syntax/gitsendemail.vim Thu Feb 21 16:05:07 2008
@@ -1,0 +1,19 @@
+" Vim syntax file
+" Language: git send-email message
+" Maintainer: Tim Pope
+" Filenames: *.msg.[0-9]* (first line is "From ... # This line is ignored.")
+" Last Change: 2007 Dec 16
+
+if exists("b:current_syntax")
+ finish
+endif
+
+runtime! syntax/mail.vim
+syn case match
+
+syn match gitsendemailComment "\%^From.*#.*"
+syn match gitsendemailComment "^GIT:.*"
+
+hi def link gitsendemailComment Comment
+
+let b:current_syntax = "gitsendemail"
More information about the pkg-vim-maintainers
mailing list