cf5 elaborated. p4 shortcuts added

This commit is contained in:
Vahagn Khachatryan
2013-06-19 18:28:01 +05:00
parent b2d25de6ba
commit 96acfe3416
3 changed files with 119 additions and 27 deletions

View File

@@ -73,7 +73,27 @@ if exists('&modeline')
set modeline
set modelines=10
endif
"
" Set fold method if supported
"
if has('folding')
set nofoldenable
set foldmethod=indent "fold based on indent
set foldnestmax=5
set foldlevel=1
if has("autocmd")
autocmd FileType vim setlocal foldmethod=marker
autocmd FileType c setlocal foldmethod=syntax
autocmd FileType h setlocal foldmethod=syntax
autocmd FileType cpp setlocal foldmethod=syntax
endif
endif
"
" P4
"
command! -nargs=* PFedit :!p4 edit <args> %
command! -nargs=* PFrevert :!p4 revert <args> %
command! -nargs=* PFdiff :!p4 diff <args> %
" Only do this part when compiled with support for autocommands.
if has("autocmd")
@@ -194,6 +214,8 @@ if has("gui_running")
\set showtabline=1 <Bar>
\endif <CR>
" Open fine in a new tab.
" Open file in a new tab.
map <silent> <C-F3> :browse tabnew %:p:h<CR>
endif