" my macros for CVS " " shortcuts are organized such that " c* performs simple cvs operations " C* executes one of the cvs GUI programs " " a runtime list of mappings can be generated with c? " " ASIDE: unless changed, in my configuration is bound to , " " --------------------------------------------------------------------------- " help for this menu :map c? :call MyCVSCmdList() " --------------------------------------------------------------------------- " single file ops :map ce :!cvs edit %:e! :map cc :call MyCVSFileCommit(expand("%")) :map c= :call MyCVSFileDiffs(expand("%")) " --------------------------------------------------------------------------- " global ops ":map cp :!bk pending:e! ":map cc :!bk commit:e! " --------------------------------------------------------------------------- " invoke GUI tools ":map Cc :!bk citool:e! ":map Cr :!bk revtool:e! " --------------------------------------------------------------------------- " do a cvs commit function! MyCVSFileCommit(file) let l:line = "echo ===================================================" let l:info = "echo 'diffs for " . a:file . "'" let l:diff = "cvs diff " . a:file let l:cmd = l:line .";" . l:info . ";" . l:line . ";" . l:diff let l:wait = "echo 'Push ENTER to edit commit comment...' ; read" exec "!" . l:cmd . ";echo;echo;" . l:wait . ";cvs commit " . a:file endfunction " --------------------------------------------------------------------------- " print changes in file function! MyCVSFileDiffs(file) let l:line = "echo ===================================================" let l:info = "echo 'diffs for " . a:file . "'" let l:diff = "cvs diff " . a:file let l:cmd = l:line .";" . l:info . ";" . l:line . ";" . l:diff exec "!" . l:cmd endfunction " --------------------------------------------------------------------------- " dump list of commands that are bound to [cC] function! MyCVSCmdList() echo 'generic mapping' map c echo 'gui mappings' map C endfunction