Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 911607 Details for
Bug 1112441
[RFE] update vim syntax file for git with new keywords
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch that changes the whitespace inside syntax files to match vim-7.4
vim-7.2-git-syntax-whitespace.patch (text/plain), 9.39 KB, created by
Evgueni Souleimanov
on 2014-06-24 00:58:33 UTC
(
hide
)
Description:
patch that changes the whitespace inside syntax files to match vim-7.4
Filename:
MIME Type:
Creator:
Evgueni Souleimanov
Created:
2014-06-24 00:58:33 UTC
Size:
9.39 KB
patch
obsolete
>diff -urN a/runtime/ftplugin/gitcommit.vim b/runtime/ftplugin/gitcommit.vim >--- a/runtime/ftplugin/gitcommit.vim 2008-06-04 11:39:49.000000000 -0400 >+++ b/runtime/ftplugin/gitcommit.vim 2014-06-22 15:47:19.000000000 -0400 >@@ -25,7 +25,7 @@ > endif > > if !exists("b:git_dir") >- let b:git_dir = expand("%:p:h") >+ let b:git_dir = expand("%:p:h") > endif > > " Automatically diffing can be done with: >@@ -33,36 +33,36 @@ > 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 >+ 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 >- return args >+ endif >+ return args > endfunction > > function! s:gitdiffcached(bang,gitdir,...) >- let tree = fnamemodify(a:gitdir,':h') >- let name = tempname() >- let git = "git" >- if strpart(getcwd(),0,strlen(tree)) != tree >- let git .= " --git-dir=".(exists("*shellescape") ? shellescape(a:gitdir) : '"'.a:gitdir.'"') >- endif >- if a:0 >- let extra = join(map(copy(a:000),exists("*shellescape") ? 'shellescape(v:val)' : "'\"'.v:val.'\"'")) >- else >- let extra = "-p --stat=".&columns >- endif >- call system(git." diff --cached --no-color ".extra." > ".(exists("*shellescape") ? shellescape(name) : name)) >- exe "pedit ".(exists("*fnameescape") ? fnameescape(name) : 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=git >+ let tree = fnamemodify(a:gitdir,':h') >+ let name = tempname() >+ let git = "git" >+ if strpart(getcwd(),0,strlen(tree)) != tree >+ let git .= " --git-dir=".(exists("*shellescape") ? shellescape(a:gitdir) : '"'.a:gitdir.'"') >+ endif >+ if a:0 >+ let extra = join(map(copy(a:000),exists("*shellescape") ? 'shellescape(v:val)' : "'\"'.v:val.'\"'")) >+ else >+ let extra = "-p --stat=".&columns >+ endif >+ call system(git." diff --cached --no-color ".extra." > ".(exists("*shellescape") ? shellescape(name) : name)) >+ exe "pedit ".(exists("*fnameescape") ? fnameescape(name) : 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=git > endfunction >diff -urN a/runtime/ftplugin/gitrebase.vim b/runtime/ftplugin/gitrebase.vim >--- a/runtime/ftplugin/gitrebase.vim 2008-04-16 04:12:25.000000000 -0400 >+++ b/runtime/ftplugin/gitrebase.vim 2014-06-22 15:48:15.000000000 -0400 >@@ -5,7 +5,7 @@ > > " Only do this when not done yet for this buffer > if (exists("b:did_ftplugin")) >- finish >+ finish > endif > > runtime! ftplugin/git.vim >@@ -13,16 +13,16 @@ > > setlocal comments=:# commentstring=#\ %s formatoptions-=t > if !exists("b:undo_ftplugin") >- let b:undo_ftplugin = "" >+ let b:undo_ftplugin = "" > endif > let b:undo_ftplugin = b:undo_ftplugin."|setl com< cms< fo<" > > function! s:choose(word) >- s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e >+ s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e > endfunction > > function! s:cycle() >- call s:choose(get({'s':'edit','p':'squash'},getline('.')[0],'pick')) >+ call s:choose(get({'s':'edit','p':'squash'},getline('.')[0],'pick')) > endfunction > > command! -buffer -bar Pick :call s:choose('pick') >@@ -33,7 +33,7 @@ > "nnoremap <buffer> <silent> S :Cycle<CR> > > if exists("g:no_plugin_maps") || exists("g:no_gitrebase_maps") >- finish >+ finish > endif > > nnoremap <buffer> <expr> K col('.') < 7 && expand('<Lt>cword>') =~ '\X' && getline('.') =~ '^\w\+\s\+\x\+\>' ? 'wK' : 'K' >diff -urN a/runtime/ftplugin/git.vim b/runtime/ftplugin/git.vim >--- a/runtime/ftplugin/git.vim 2008-07-31 16:07:24.000000000 -0400 >+++ b/runtime/ftplugin/git.vim 2014-06-22 15:49:39.000000000 -0400 >@@ -5,29 +5,29 @@ > > " Only do this when not done yet for this buffer > if (exists("b:did_ftplugin")) >- finish >+ finish > endif > let b:did_ftplugin = 1 > > if !exists('b:git_dir') >- if expand('%:p') =~# '\.git\>' >- let b:git_dir = matchstr(expand('%:p'),'.*\.git\>') >- elseif $GIT_DIR != '' >- let b:git_dir = $GIT_DIR >- endif >- if (has('win32') || has('win64')) && exists('b:git_dir') >- let b:git_dir = substitute(b:git_dir,'\\','/','g') >- endif >+ if expand('%:p') =~# '\.git\>' >+ let b:git_dir = matchstr(expand('%:p'),'.*\.git\>') >+ elseif $GIT_DIR != '' >+ let b:git_dir = $GIT_DIR >+ endif >+ if (has('win32') || has('win64')) && exists('b:git_dir') >+ let b:git_dir = substitute(b:git_dir,'\\','/','g') >+ endif > endif > > if exists('*shellescape') && exists('b:git_dir') && b:git_dir != '' >- if b:git_dir =~# '/\.git$' " Not a bare repository >- let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path >- endif >- let &l:path = escape(b:git_dir,'\, ').','.&l:path >- let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show' >+ if b:git_dir =~# '/\.git$' " Not a bare repository >+ let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path >+ endif >+ let &l:path = escape(b:git_dir,'\, ').','.&l:path >+ let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show' > else >- setlocal keywordprg=git\ show >+ setlocal keywordprg=git\ show > endif > > setlocal includeexpr=substitute(v:fname,'^[^/]\\+/','','') >diff -urN a/runtime/indent/gitconfig.vim b/runtime/indent/gitconfig.vim >--- a/runtime/indent/gitconfig.vim 2008-06-04 11:44:21.000000000 -0400 >+++ b/runtime/indent/gitconfig.vim 2014-06-22 15:50:25.000000000 -0400 >@@ -18,18 +18,18 @@ > endif > > function! GetGitconfigIndent() >- let line = getline(prevnonblank(v:lnum-1)) >- let cline = getline(v:lnum) >- if line =~ '\\\@<!\%(\\\\\)*\\$' >- " odd number of slashes, in a line continuation >- return 2 * &sw >- elseif cline =~ '^\s*\[' >- return 0 >- elseif cline =~ '^\s*\a' >- return &sw >- elseif cline == '' && line =~ '^\[' >- return &sw >- else >- return -1 >- endif >+ let line = getline(prevnonblank(v:lnum-1)) >+ let cline = getline(v:lnum) >+ if line =~ '\\\@<!\%(\\\\\)*\\$' >+ " odd number of slashes, in a line continuation >+ return 2 * &sw >+ elseif cline =~ '^\s*\[' >+ return 0 >+ elseif cline =~ '^\s*\a' >+ return &sw >+ elseif cline == '' && line =~ '^\[' >+ return &sw >+ else >+ return -1 >+ endif > endfunction >diff -urN a/runtime/syntax/gitcommit.vim b/runtime/syntax/gitcommit.vim >--- a/runtime/syntax/gitcommit.vim 2008-04-15 18:46:45.000000000 -0400 >+++ b/runtime/syntax/gitcommit.vim 2014-06-22 15:51:10.000000000 -0400 >@@ -5,14 +5,14 @@ > " Last Change: 2008 Apr 09 > > if exists("b:current_syntax") >- finish >+ finish > endif > > syn case match > syn sync minlines=50 > > if has("spell") >- syn spell toplevel >+ syn spell toplevel > endif > > syn include @gitcommitDiff syntax/diff.vim >diff -urN a/runtime/syntax/gitconfig.vim b/runtime/syntax/gitconfig.vim >--- a/runtime/syntax/gitconfig.vim 2008-06-04 11:45:44.000000000 -0400 >+++ b/runtime/syntax/gitconfig.vim 2014-06-22 15:51:20.000000000 -0400 >@@ -5,7 +5,7 @@ > " Last Change: 2008 Jun 04 > > if exists("b:current_syntax") >- finish >+ finish > endif > > setlocal iskeyword+=- >diff -urN a/runtime/syntax/gitrebase.vim b/runtime/syntax/gitrebase.vim >--- a/runtime/syntax/gitrebase.vim 2008-04-16 04:12:25.000000000 -0400 >+++ b/runtime/syntax/gitrebase.vim 2014-06-22 15:57:17.000000000 -0400 >@@ -5,7 +5,7 @@ > " Last Change: 2008 Apr 16 > > if exists("b:current_syntax") >- finish >+ finish > endif > > syn case match >@@ -26,6 +26,6 @@ > hi def link gitrebaseSquash Type > hi def link gitrebaseSummary String > hi def link gitrebaseComment Comment >-hi def link gitrebaseSquashError Error >+hi def link gitrebaseSquashError Error > > let b:current_syntax = "gitrebase" >diff -urN a/runtime/syntax/gitsendemail.vim b/runtime/syntax/gitsendemail.vim >--- a/runtime/syntax/gitsendemail.vim 2008-03-01 12:18:06.000000000 -0500 >+++ b/runtime/syntax/gitsendemail.vim 2014-06-22 15:51:48.000000000 -0400 >@@ -5,7 +5,7 @@ > " Last Change: 2007 Dec 16 > > if exists("b:current_syntax") >- finish >+ finish > endif > > runtime! syntax/mail.vim >diff -urN a/runtime/syntax/git.vim b/runtime/syntax/git.vim >--- a/runtime/syntax/git.vim 2008-04-15 23:15:49.000000000 -0400 >+++ b/runtime/syntax/git.vim 2014-06-22 15:55:15.000000000 -0400 >@@ -4,7 +4,7 @@ > " Last Change: 2008 Mar 21 > > if exists("b:current_syntax") >- finish >+ finish > endif > > syn case match
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1112441
: 911607 |
911608
|
911609