Mercurial > vim
annotate runtime/ftplugin/git.vim @ 20701:fbee68c6aab1 v8.2.0904
patch 8.2.0904: assuming modifyOtherKeys for rhs of mapping
Commit: https://github.com/vim/vim/commit/46cd43bda102c3782bba1c4c629836e010734d77
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 4 22:22:11 2020 +0200
patch 8.2.0904: assuming modifyOtherKeys for rhs of mapping
Problem: Assuming modifyOtherKeys for rhs of mapping.
Solution: Ignore seenModifyOtherKeys for mapped characters. (closes https://github.com/vim/vim/issues/6200)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 04 Jun 2020 22:30:04 +0200 |
parents | 5c40013d45ee |
children |
rev | line source |
---|---|
1620 | 1 " Vim filetype plugin |
2 " Language: generic git output | |
2034 | 3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org> |
18818 | 4 " Last Change: 2019 Dec 05 |
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') | |
18818 | 13 if expand('%:p') =~# '[\/]\.git[\/]modules[\/]\|:[\/][\/]\|^\a\a\+:' |
3465 | 14 " Stay out of the way |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
15 elseif expand('%:p') =~# '[\/]\.git[\/]worktrees' |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
16 let b:git_dir = matchstr(expand('%:p'),'.*\.git[\/]worktrees[\/][^\/]\+\>') |
3465 | 17 elseif expand('%:p') =~# '\.git\>' |
2202 | 18 let b:git_dir = matchstr(expand('%:p'),'.*\.git\>') |
19 elseif $GIT_DIR != '' | |
20 let b:git_dir = $GIT_DIR | |
21 endif | |
22 if (has('win32') || has('win64')) && exists('b:git_dir') | |
23 let b:git_dir = substitute(b:git_dir,'\\','/','g') | |
24 endif | |
1620 | 25 endif |
26 | |
27 if exists('*shellescape') && exists('b:git_dir') && b:git_dir != '' | |
2202 | 28 if b:git_dir =~# '/\.git$' " Not a bare repository |
29 let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path | |
30 endif | |
31 let &l:path = escape(b:git_dir,'\, ').','.&l:path | |
32 let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show' | |
1620 | 33 else |
2202 | 34 setlocal keywordprg=git\ show |
1620 | 35 endif |
2034 | 36 if has('gui_running') |
37 let &l:keywordprg = substitute(&l:keywordprg,'^git\>','git --no-pager','') | |
38 endif | |
1620 | 39 |
40 setlocal includeexpr=substitute(v:fname,'^[^/]\\+/','','') | |
41 let b:undo_ftplugin = "setl keywordprg< path< includeexpr<" |