r1213 - in /trunk/packages/vim: patches/ runtime/doc/ runtime/ftdetect/ runtime/ftplugin/ runtime/indent/ runtime/syntax/
madduck at users.alioth.debian.org
madduck at users.alioth.debian.org
Thu Feb 21 16:28:10 UTC 2008
Author: madduck
Date: Thu Feb 21 16:28:10 2008
New Revision: 1213
URL: http://svn.debian.org/wsvn/pkg-vim/?sc=1&rev=1213
Log:
Remove vim-git files and add patch
I accidentally added the files directly, now a new patch exists in the
series to add the vim-git integration.
Added:
trunk/packages/vim/patches/vim-git.diff
Removed:
trunk/packages/vim/runtime/doc/ft-gitcommit-plugin.txt
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/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/patches/series
Modified: trunk/packages/vim/patches/series
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/patches/series?rev=1213&op=diff
==============================================================================
--- trunk/packages/vim/patches/series (original)
+++ trunk/packages/vim/patches/series Thu Feb 21 16:28:10 2008
@@ -33,3 +33,4 @@
mve.awk-interpreter.diff -p0
option.c-langmap_comma.diff -p0
make.vim-syntax.diff -p0
+vim-git.diff -p2
Added: trunk/packages/vim/patches/vim-git.diff
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/patches/vim-git.diff?rev=1213&op=file
==============================================================================
--- trunk/packages/vim/patches/vim-git.diff (added)
+++ trunk/packages/vim/patches/vim-git.diff Thu Feb 21 16:28:10 2008
@@ -1,0 +1,365 @@
+diff --git a/packages/vim/runtime/doc/ft-gitcommit-plugin.txt b/packages/vim/runtime/doc/ft-gitcommit-plugin.txt
+new file mode 100644
+index 0000000..51387e7
+--- /dev/null
++++ b/packages/vim/runtime/doc/ft-gitcommit-plugin.txt
+@@ -0,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.
+diff --git a/packages/vim/runtime/ftdetect/git.vim b/packages/vim/runtime/ftdetect/git.vim
+new file mode 100644
+index 0000000..d673bca
+--- /dev/null
++++ b/packages/vim/runtime/ftdetect/git.vim
+@@ -0,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
+diff --git a/packages/vim/runtime/ftplugin/gitcommit.vim b/packages/vim/runtime/ftplugin/gitcommit.vim
+new file mode 100644
+index 0000000..31d5f22
+--- /dev/null
++++ b/packages/vim/runtime/ftplugin/gitcommit.vim
+@@ -0,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
+diff --git a/packages/vim/runtime/ftplugin/gitconfig.vim b/packages/vim/runtime/ftplugin/gitconfig.vim
+new file mode 100644
+index 0000000..ee33baf
+--- /dev/null
++++ b/packages/vim/runtime/ftplugin/gitconfig.vim
+@@ -0,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<"
+diff --git a/packages/vim/runtime/ftplugin/gitrebase.vim b/packages/vim/runtime/ftplugin/gitrebase.vim
+new file mode 100644
+index 0000000..1bcdf2b
+--- /dev/null
++++ b/packages/vim/runtime/ftplugin/gitrebase.vim
+@@ -0,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<"
+diff --git a/packages/vim/runtime/ftplugin/gitsendemail.vim b/packages/vim/runtime/ftplugin/gitsendemail.vim
+new file mode 100644
+index 0000000..a83e48a
+--- /dev/null
++++ b/packages/vim/runtime/ftplugin/gitsendemail.vim
+@@ -0,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
+diff --git a/packages/vim/runtime/indent/gitconfig.vim b/packages/vim/runtime/indent/gitconfig.vim
+new file mode 100644
+index 0000000..9909cab
+--- /dev/null
++++ b/packages/vim/runtime/indent/gitconfig.vim
+@@ -0,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
+diff --git a/packages/vim/runtime/syntax/gitcommit.vim b/packages/vim/runtime/syntax/gitcommit.vim
+new file mode 100644
+index 0000000..e5ce312
+--- /dev/null
++++ b/packages/vim/runtime/syntax/gitcommit.vim
+@@ -0,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"
+diff --git a/packages/vim/runtime/syntax/gitconfig.vim b/packages/vim/runtime/syntax/gitconfig.vim
+new file mode 100644
+index 0000000..e57a32d
+--- /dev/null
++++ b/packages/vim/runtime/syntax/gitconfig.vim
+@@ -0,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"
+diff --git a/packages/vim/runtime/syntax/gitrebase.vim b/packages/vim/runtime/syntax/gitrebase.vim
+new file mode 100644
+index 0000000..1d1b7ef
+--- /dev/null
++++ b/packages/vim/runtime/syntax/gitrebase.vim
+@@ -0,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"
+diff --git a/packages/vim/runtime/syntax/gitsendemail.vim b/packages/vim/runtime/syntax/gitsendemail.vim
+new file mode 100644
+index 0000000..d247cda
+--- /dev/null
++++ b/packages/vim/runtime/syntax/gitsendemail.vim
+@@ -0,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