Mercurial > vim
comparison runtime/ftplugin/gitcommit.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | 2eb30f341e8d |
children | 5c40013d45ee |
comparison
equal
deleted
inserted
replaced
10047:a62862410ca1 | 10048:43efa4f5a8ea |
---|---|
1 " Vim filetype plugin | 1 " Vim filetype plugin |
2 " Language: git commit file | 2 " Language: git commit file |
3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org> | 3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org> |
4 " Last Change: 2013 May 30 | 4 " Last Change: 2016 Aug 29 |
5 | 5 |
6 " Only do this when not done yet for this buffer | 6 " Only do this when not done yet for this buffer |
7 if (exists("b:did_ftplugin")) | 7 if (exists("b:did_ftplugin")) |
8 finish | 8 finish |
9 endif | 9 endif |
10 | 10 |
11 runtime! ftplugin/git.vim | 11 runtime! ftplugin/git.vim |
12 let b:did_ftplugin = 1 | 12 let b:did_ftplugin = 1 |
13 | 13 |
14 setlocal nomodeline tabstop=8 formatoptions-=croq formatoptions+=tl | 14 setlocal comments=:# commentstring=#\ %s |
15 | 15 setlocal nomodeline tabstop=8 formatoptions+=tl textwidth=72 |
16 let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions<' | 16 setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q |
17 | 17 let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions< tw< com< cms<' |
18 if &textwidth == 0 | |
19 " make sure that log messages play nice with git-log on standard terminals | |
20 setlocal textwidth=72 | |
21 let b:undo_ftplugin .= "|setl tw<" | |
22 endif | |
23 | 18 |
24 if exists("g:no_gitcommit_commands") || v:version < 700 | 19 if exists("g:no_gitcommit_commands") || v:version < 700 |
25 finish | 20 finish |
26 endif | 21 endif |
27 | 22 |
28 if !exists("b:git_dir") | 23 if !exists("b:git_dir") |
29 let b:git_dir = expand("%:p:h") | 24 let b:git_dir = expand("%:p:h") |
30 endif | 25 endif |
31 | 26 |
32 command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>) | 27 command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>) |
28 | |
29 let b:undo_ftplugin = b:undo_ftplugin . "|delc DiffGitCached" | |
33 | 30 |
34 function! s:diffcomplete(A,L,P) | 31 function! s:diffcomplete(A,L,P) |
35 let args = "" | 32 let args = "" |
36 if a:P <= match(a:L." -- "," -- ")+3 | 33 if a:P <= match(a:L." -- "," -- ")+3 |
37 let args = args . "-p\n--stat\n--shortstat\n--summary\n--patch-with-stat\n--no-renames\n-B\n-M\n-C\n" | 34 let args = args . "-p\n--stat\n--shortstat\n--summary\n--patch-with-stat\n--no-renames\n-B\n-M\n-C\n" |