Mercurial > vim
annotate runtime/ftplugin/git.vim @ 5008:3717d569027d v7.3.1248
updated for version 7.3.1248
Problem: Still have old hacking code for Input Method.
Solution: Add 'imactivatefunc' and 'imstatusfunc' as a generic solution to
Input Method activation. (Yukihiro Nakadaira)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 26 Jun 2013 19:18:05 +0200 |
parents | 2eb30f341e8d |
children | 43efa4f5a8ea |
rev | line source |
---|---|
1620 | 1 " Vim filetype plugin |
2 " Language: generic git output | |
2034 | 3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org> |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
3465
diff
changeset
|
4 " Last Change: 2013 May 30 |
1620 | 5 |
6 " Only do this when not done yet for this buffer | |
7 if (exists("b:did_ftplugin")) | |
2202 | 8 finish |
1620 | 9 endif |
10 let b:did_ftplugin = 1 | |
11 | |
12 if !exists('b:git_dir') | |
3465 | 13 if expand('%:p') =~# '[\/]\.git[\/]modules[\/]' |
14 " Stay out of the way | |
15 elseif expand('%:p') =~# '\.git\>' | |
2202 | 16 let b:git_dir = matchstr(expand('%:p'),'.*\.git\>') |
17 elseif $GIT_DIR != '' | |
18 let b:git_dir = $GIT_DIR | |
19 endif | |
20 if (has('win32') || has('win64')) && exists('b:git_dir') | |
21 let b:git_dir = substitute(b:git_dir,'\\','/','g') | |
22 endif | |
1620 | 23 endif |
24 | |
25 if exists('*shellescape') && exists('b:git_dir') && b:git_dir != '' | |
2202 | 26 if b:git_dir =~# '/\.git$' " Not a bare repository |
27 let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path | |
28 endif | |
29 let &l:path = escape(b:git_dir,'\, ').','.&l:path | |
30 let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show' | |
1620 | 31 else |
2202 | 32 setlocal keywordprg=git\ show |
1620 | 33 endif |
2034 | 34 if has('gui_running') |
35 let &l:keywordprg = substitute(&l:keywordprg,'^git\>','git --no-pager','') | |
36 endif | |
1620 | 37 |
38 setlocal includeexpr=substitute(v:fname,'^[^/]\\+/','','') | |
39 let b:undo_ftplugin = "setl keywordprg< path< includeexpr<" |