annotate runtime/ftplugin/git.vim @ 2502:e6420d275b6a vim73

Update README files. Remove references to extra and lang archives.
author Bram Moolenaar <bram@vim.org>
date Sat, 07 Aug 2010 13:19:27 +0200
parents f7579a31705c
children 161d01cbb165
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1620
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
1 " Vim filetype plugin
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
2 " Language: generic git output
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
4 " Last Change: 2010 May 21
1620
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
5
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
6 " Only do this when not done yet for this buffer
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
7 if (exists("b:did_ftplugin"))
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
8 finish
1620
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
9 endif
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
10 let b:did_ftplugin = 1
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
11
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
12 if !exists('b:git_dir')
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
13 if expand('%:p') =~# '\.git\>'
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
14 let b:git_dir = matchstr(expand('%:p'),'.*\.git\>')
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
15 elseif $GIT_DIR != ''
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
16 let b:git_dir = $GIT_DIR
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
17 endif
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
18 if (has('win32') || has('win64')) && exists('b:git_dir')
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
19 let b:git_dir = substitute(b:git_dir,'\\','/','g')
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
20 endif
1620
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
21 endif
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
22
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
23 if exists('*shellescape') && exists('b:git_dir') && b:git_dir != ''
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
24 if b:git_dir =~# '/\.git$' " Not a bare repository
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
25 let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
26 endif
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
27 let &l:path = escape(b:git_dir,'\, ').','.&l:path
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
28 let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show'
1620
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
29 else
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
30 setlocal keywordprg=git\ show
1620
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
31 endif
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
32 if has('gui_running')
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
33 let &l:keywordprg = substitute(&l:keywordprg,'^git\>','git --no-pager','')
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
34 endif
1620
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
35
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
36 setlocal includeexpr=substitute(v:fname,'^[^/]\\+/','','')
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
37 let b:undo_ftplugin = "setl keywordprg< path< includeexpr<"