Change section heading style

This commit is contained in:
Tim Pope
2014-06-21 08:48:11 -04:00
parent 3e3a899cf1
commit e6e259c2d2

View File

@@ -12,7 +12,7 @@ if !exists('g:fugitive_git_executable')
let g:fugitive_git_executable = 'git' let g:fugitive_git_executable = 'git'
endif endif
" Utility {{{1 " Section: Utility
function! s:function(name) abort function! s:function(name) abort
return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),'')) return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),''))
@@ -115,8 +115,7 @@ augroup END
let s:abstract_prototype = {} let s:abstract_prototype = {}
" }}}1 " Section: Initialization
" Initialization {{{1
function! fugitive#is_git_dir(path) abort function! fugitive#is_git_dir(path) abort
let path = s:sub(a:path, '[\/]$', '') . '/' let path = s:sub(a:path, '[\/]$', '') . '/'
@@ -202,8 +201,7 @@ augroup fugitive
autocmd BufWinLeave * execute getwinvar(+bufwinnr(+expand('<abuf>')), 'fugitive_leave') autocmd BufWinLeave * execute getwinvar(+bufwinnr(+expand('<abuf>')), 'fugitive_leave')
augroup END augroup END
" }}}1 " Section: Repository
" Repository {{{1
let s:repo_prototype = {} let s:repo_prototype = {}
let s:repos = {} let s:repos = {}
@@ -442,8 +440,7 @@ endfunction
call s:add_methods('repo',['keywordprg']) call s:add_methods('repo',['keywordprg'])
" }}}1 " Section: Buffer
" Buffer {{{1
let s:buffer_prototype = {} let s:buffer_prototype = {}
@@ -618,8 +615,7 @@ endfunction
call s:add_methods('buffer',['getvar','setvar','getline','repo','type','spec','name','commit','path','rev','sha1','expand','containing_commit','up']) call s:add_methods('buffer',['getvar','setvar','getline','repo','type','spec','name','commit','path','rev','sha1','expand','containing_commit','up'])
" }}}1 " Section: Git
" Git {{{1
call s:command("-bang -nargs=? -complete=customlist,s:GitComplete Git :execute s:Git(<bang>0,<q-args>)") call s:command("-bang -nargs=? -complete=customlist,s:GitComplete Git :execute s:Git(<bang>0,<q-args>)")
@@ -660,8 +656,7 @@ function! s:GitComplete(A,L,P) abort
endif endif
endfunction endfunction
" }}}1 " Section: Gcd, Glcd
" Gcd, Glcd {{{1
function! s:DirComplete(A,L,P) abort function! s:DirComplete(A,L,P) abort
let matches = s:repo().dirglob(a:A) let matches = s:repo().dirglob(a:A)
@@ -671,8 +666,7 @@ endfunction
call s:command("-bar -bang -nargs=? -complete=customlist,s:DirComplete Gcd :cd<bang> `=s:repo().bare() ? s:repo().dir(<q-args>) : s:repo().tree(<q-args>)`") call s:command("-bar -bang -nargs=? -complete=customlist,s:DirComplete Gcd :cd<bang> `=s:repo().bare() ? s:repo().dir(<q-args>) : s:repo().tree(<q-args>)`")
call s:command("-bar -bang -nargs=? -complete=customlist,s:DirComplete Glcd :lcd<bang> `=s:repo().bare() ? s:repo().dir(<q-args>) : s:repo().tree(<q-args>)`") call s:command("-bar -bang -nargs=? -complete=customlist,s:DirComplete Glcd :lcd<bang> `=s:repo().bare() ? s:repo().dir(<q-args>) : s:repo().tree(<q-args>)`")
" }}}1 " Section: Gstatus
" Gstatus {{{1
call s:command("-bar Gstatus :execute s:Status()") call s:command("-bar Gstatus :execute s:Status()")
augroup fugitive_status augroup fugitive_status
@@ -936,8 +930,7 @@ function! s:StagePatch(lnum1,lnum2) abort
return 'checktime' return 'checktime'
endfunction endfunction
" }}}1 " Section: Gcommit
" Gcommit {{{1
call s:command("-nargs=? -complete=customlist,s:CommitComplete Gcommit :execute s:Commit(<q-args>)") call s:command("-nargs=? -complete=customlist,s:CommitComplete Gcommit :execute s:Commit(<q-args>)")
@@ -1043,8 +1036,7 @@ augroup fugitive_commit
autocmd VimLeavePre,BufDelete COMMIT_EDITMSG execute s:sub(s:FinishCommit(), '^echoerr (.*)', 'echohl ErrorMsg|echo \1|echohl NONE') autocmd VimLeavePre,BufDelete COMMIT_EDITMSG execute s:sub(s:FinishCommit(), '^echoerr (.*)', 'echohl ErrorMsg|echo \1|echohl NONE')
augroup END augroup END
" }}}1 " Section: Ggrep, Glog
" Ggrep, Glog {{{1
if !exists('g:fugitive_summary_format') if !exists('g:fugitive_summary_format')
let g:fugitive_summary_format = '%s' let g:fugitive_summary_format = '%s'
@@ -1128,8 +1120,7 @@ function! s:Log(cmd,...) abort
endtry endtry
endfunction endfunction
" }}}1 " Section: Gedit, Gpedit, Gsplit, Gvsplit, Gtabedit, Gread
" Gedit, Gpedit, Gsplit, Gvsplit, Gtabedit, Gread {{{1
function! s:Edit(cmd,bang,...) abort function! s:Edit(cmd,bang,...) abort
let buffer = s:buffer() let buffer = s:buffer()
@@ -1226,8 +1217,7 @@ call s:command("-bar -bang -nargs=* -complete=customlist,s:EditRunComplete Gvspl
call s:command("-bar -bang -nargs=* -complete=customlist,s:EditRunComplete Gtabedit :execute s:Edit('tabedit',<bang>0,<f-args>)") call s:command("-bar -bang -nargs=* -complete=customlist,s:EditRunComplete Gtabedit :execute s:Edit('tabedit',<bang>0,<f-args>)")
call s:command("-bar -bang -nargs=* -count -complete=customlist,s:EditRunComplete Gread :execute s:Edit((!<count> && <line1> ? '' : <count>).'read',<bang>0,<f-args>)") call s:command("-bar -bang -nargs=* -count -complete=customlist,s:EditRunComplete Gread :execute s:Edit((!<count> && <line1> ? '' : <count>).'read',<bang>0,<f-args>)")
" }}}1 " Section: Gwrite, Gwq
" Gwrite, Gwq {{{1
call s:command("-bar -bang -nargs=* -complete=customlist,s:EditComplete Gwrite :execute s:Write(<bang>0,<f-args>)") call s:command("-bar -bang -nargs=* -complete=customlist,s:EditComplete Gwrite :execute s:Write(<bang>0,<f-args>)")
call s:command("-bar -bang -nargs=* -complete=customlist,s:EditComplete Gw :execute s:Write(<bang>0,<f-args>)") call s:command("-bar -bang -nargs=* -complete=customlist,s:EditComplete Gw :execute s:Write(<bang>0,<f-args>)")
@@ -1383,8 +1373,7 @@ function! s:Wq(force,...) abort
endif endif
endfunction endfunction
" }}}1 " Section: Gdiff
" Gdiff {{{1
call s:command("-bang -bar -nargs=* -complete=customlist,s:EditComplete Gdiff :execute s:Diff('',<f-args>)") call s:command("-bang -bar -nargs=* -complete=customlist,s:EditComplete Gdiff :execute s:Diff('',<f-args>)")
call s:command("-bar -nargs=* -complete=customlist,s:EditComplete Gvdiff :execute s:Diff('vert ',<f-args>)") call s:command("-bar -nargs=* -complete=customlist,s:EditComplete Gvdiff :execute s:Diff('vert ',<f-args>)")
@@ -1557,8 +1546,7 @@ function! s:Diff(vert,...) abort
endtry endtry
endfunction endfunction
" }}}1 " Section: Gmove, Gremove
" Gmove, Gremove {{{1
function! s:Move(force,destination) abort function! s:Move(force,destination) abort
if a:destination =~# '^/' if a:destination =~# '^/'
@@ -1634,8 +1622,7 @@ augroup fugitive_remove
\ endif \ endif
augroup END augroup END
" }}}1 " Section: Gblame
" Gblame {{{1
augroup fugitive_blame augroup fugitive_blame
autocmd! autocmd!
@@ -1859,8 +1846,7 @@ function! s:BlameSyntax() abort
hi def link FugitiveblameNotCommittedYet Comment hi def link FugitiveblameNotCommittedYet Comment
endfunction endfunction
" }}}1 " Section: Gbrowse
" Gbrowse {{{1
call s:command("-bar -bang -range -nargs=* -complete=customlist,s:EditComplete Gbrowse :execute s:Browse(<bang>0,<line1>,<count>,<f-args>)") call s:command("-bar -bang -range -nargs=* -complete=customlist,s:EditComplete Gbrowse :execute s:Browse(<bang>0,<line1>,<count>,<f-args>)")
@@ -2062,8 +2048,7 @@ function! s:instaweb_url(repo,rev,commit,path,type,...) abort
return url return url
endfunction endfunction
" }}}1 " Section: File access
" File access {{{1
function! s:ReplaceCmd(cmd,...) abort function! s:ReplaceCmd(cmd,...) abort
let fn = expand('%:p') let fn = expand('%:p')
@@ -2347,8 +2332,7 @@ augroup fugitive_files
\ endif \ endif
augroup END augroup END
" }}}1 " Section: Temp files
" Temp files {{{1
if !exists('s:temp_files') if !exists('s:temp_files')
let s:temp_files = {} let s:temp_files = {}
@@ -2367,8 +2351,7 @@ augroup fugitive_temp
\ endif \ endif
augroup END augroup END
" }}}1 " Section: Go to file
" Go to file {{{1
function! s:JumpInit() abort function! s:JumpInit() abort
nnoremap <buffer> <silent> <CR> :<C-U>exe <SID>GF("edit")<CR> nnoremap <buffer> <silent> <CR> :<C-U>exe <SID>GF("edit")<CR>
@@ -2557,8 +2540,7 @@ function! s:GF(mode) abort
endtry endtry
endfunction endfunction
" }}}1 " Section: Statusline
" Statusline {{{1
function! s:repo_head_ref() dict abort function! s:repo_head_ref() dict abort
if !filereadable(self.dir('HEAD')) if !filereadable(self.dir('HEAD'))
@@ -2593,8 +2575,7 @@ function! fugitive#head(...) abort
return s:repo().head(a:0 ? a:1 : 0) return s:repo().head(a:0 ? a:1 : 0)
endfunction endfunction
" }}}1 " Section: Folding
" Folding {{{1
function! fugitive#foldtext() abort function! fugitive#foldtext() abort
if &foldmethod !=# 'syntax' if &foldmethod !=# 'syntax'
@@ -2642,7 +2623,3 @@ augroup fugitive_foldtext
\ set foldtext=fugitive#foldtext() | \ set foldtext=fugitive#foldtext() |
\ endif \ endif
augroup END augroup END
" }}}1
" vim:set et sw=2: