comparison plugin/p44vim.vim @ 0:4aede5f1af45

Initial commit.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 11 Feb 2015 15:03:01 -0800
parents
children 52e1502091e0
comparison
equal deleted inserted replaced
-1:000000000000 0:4aede5f1af45
1
2 if exists('g:loaded_p44v') && !exists('g:p44v_debug')
3 finish
4 endif
5 let g:loaded_p44v = 1
6
7 if !exists('g:p44v_trace')
8 let g:p44v_trace = 0
9 endif
10
11 if !exists('g:p44v_exe')
12 let g:p44v_exe = 'p4'
13 endif
14
15 if !executable(g:p44v_exe)
16 echoerr "p44vim: '".g:p44v_exe."' is not a known executable. ".
17 \"Perforce commands won't work."
18 endif
19
20 " Autocommands {{{
21
22 " When a new buffer is opened, try to figure out if it's in a P4 depot.
23 " If it is, then setup some auto-commands to do stuff like auto-open-for-edit
24 " when you start editing the file.
25 augroup p44v_auto_detect
26 autocmd!
27 autocmd BufRead * call p44vim#install_p4_auto_commands()
28 augroup END
29
30 " }}}
31
32 " P4 Commands {{{
33
34 command! -nargs=* -complete=file P4Sync :call p44vim#p4sync(<f-args>)
35 command! -nargs=* -complete=file P4Edit :call p44vim#p4edit(<f-args>)
36 command! -nargs=* -complete=file P4Revert :call p44vim#p4revert(<f-args>)
37
38 " }}}
39