cf5 elaborated. p4 shortcuts added
This commit is contained in:
26
vim/vimrc
26
vim/vimrc
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user