" Vim filetype plugin" Language: generic git output" Maintainer: Tim Pope <vimNOSPAM@tpope.org>" Last Change: 2016 Aug 29" Only do this when not done yet for this bufferif (exists("b:did_ftplugin"))finishendiflet b:did_ftplugin = 1if !exists('b:git_dir')if expand('%:p') =~# '[\/]\.git[\/]modules[\/]'" Stay out of the wayelseif expand('%:p') =~# '[\/]\.git[\/]worktrees'let b:git_dir = matchstr(expand('%:p'),'.*\.git[\/]worktrees[\/][^\/]\+\>')elseif expand('%:p') =~# '\.git\>'let b:git_dir = matchstr(expand('%:p'),'.*\.git\>')elseif $GIT_DIR != ''let b:git_dir = $GIT_DIRendifif (has('win32') || has('win64')) && exists('b:git_dir')let b:git_dir = substitute(b:git_dir,'\\','/','g')endifendifif exists('*shellescape') && exists('b:git_dir') && b:git_dir != ''if b:git_dir =~# '/\.git$' " Not a bare repositorylet &l:path = escape(fnamemodify(b:git_dir,':h'),',円 ').','.&l:pathendiflet &l:path = escape(b:git_dir,',円 ').','.&l:pathlet &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show'elsesetlocal keywordprg=git\ showendifif has('gui_running')let &l:keywordprg = substitute(&l:keywordprg,'^git\>','git --no-pager','')endifsetlocal includeexpr=substitute(v:fname,'^[^/]\\+/','','')let b:undo_ftplugin = "setl keywordprg< path< includeexpr<"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。