Ignore:
Timestamp:
Dec 9, 2009, 3:34:22 AM (8 years ago)
Author:
mnick@…
Message:
  • new MPpatch command to show vimdiffs for patches hosted on trac
  • MPpatch documentation
File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/mpvim/ftplugin/portfile.vim

    r58759 r61336  
     1" ============================================================================
    12" Vim filetype plugin for portfile
    2 " Author: Maximilian Nickel <mnick@macports.org>
     3" Maintainer: Maximilian Nickel <mnick@macports.org>
     4" ============================================================================
    35
    46if exists("b:did_ftplugin")
     
    1315                end
    1416        endfunction
     17
     18        function TracPatch(url)
     19                let patchfile="$TMPDIR/portfile.patch"
     20                let url = substitute(a:url, "/attachment/", "/raw-attachment/", "")
     21                let cmd = "!curl --progress-bar -o \"" . patchfile . "\" \"" . url . "\""
     22                exe cmd
     23                exe "diffpatch " . patchfile
     24        endfunction
     25
    1526        let g:did_mpftplugin = 1
    1627endif
     
    1829au QuickFixCmdPre make exe "cclose"
    1930au QuickFixCmdPost make call PortfileGetErrors()
     31command! -nargs=1 MPpatch :call TracPatch("<args>")
Note: See TracChangeset for help on using the changeset viewer.