[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [VI] cvs-makroer i vim



[Oct 22. 2001] Anders Bo Rasmussen wrote: 
> Jeg har vist spurgt om noget lignende før, men det kan jo være der er
> kommet nye ting siden sidst.
> 
> Er der nogen der har et link til en god side med nogen cvs-makroer til
> vim. De skal virke til tekstmode. Det ville for eksempel være smart hvis
> man kunne diffsplitte[1] med gamle version af den fil man har åben.

Jeg ved ikke om jeg har sendt den her før men her er den.

> 
> [1] 6.0 feature
> 
> -- 
> Anders Bo Rasmussen
> mailto:sslug@sslug
> 
> God is real, unless specifically declared integer.

-- 
Mvh|Regards, Lars
Student at Department of Computer Science and Department of Psychology  
University of Copenhagen --- http://www.diku.dk/students/larsj/     
When's the last time you used duct tape on a duct? -- Larry Wall
"
" produce a command line string for general cvs use
"
function CvsCmdString(cmd, filename, messagefile)
    let dir = fnamemodify(a:filename, ":p:h")
    let file = fnamemodify(a:filename, ":t")
    if strlen(a:messagefile)
        let mflags = (" -F " . a:messagefile . " ")
     else
        let mflags = " "
    endif
    " use /bin/sh to guarantee that we get the env variable CVS_RSH set right
    " for the command
    let command = ("/bin/sh -c 'cd " . dir . " && " ."CVS_RSH=" . $CVS_RSH)
    let command = (command . " cvs -d " . $CVSROOT . " " . a:cmd . mflags .  file . "'")
    return command
endfunction

"
" execute the command 'cmd' for the current buffer, don't create
" a new log message
"
function DoCvsCmdNoMsg(cmd)
    let command = CvsCmdString(a:cmd, expand("%"), "")
    exec ("! " . command)
endfunction

"
" execute the cmd 'cmd' for the current buffer, opening up
" a temp file for a log message, and binding ';cc' to 
" checking in the original buffer's file with the log message
" from the temp file
"
function DoCvsCmdGetMsg(cmd)
    let tempfname = tempname()
    let command = CvsCmdString(a:cmd, expand("%"), tempfname)
    new
    call append(0, "\CVS                CVS LOG ENTRY                       CVS")
    call append(1, "\CVS         Enter your change comments here            CVS")
    call append(2, "\CVS            type :q! to abort or                    CVS")
    call append(3, "\CVS             type ;cc to commit                     CVS")
    exec "write " . tempfname
    exec "map ;cc " . ":%! grep -v ^CVS
:w
:!" . command . "
:q!

"
endfunction



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 18:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *