Thursday, May 10, 2012

Re: Syntax highlight + "$VCS blame"?

On Thursday, May 10, 2012 12:20:16 PM UTC-5, Tim Chase wrote:
> I occasionally issue a "$VCS blame" command (where $VCS may be
> subversion, git, or mercurial in most of my use cases). It would be
> nice to be able to see the original source in its "natural" syntax
> highlighting, ignoring the blame leaders on each line.
>
> I don't expect this would readily work for most syntax files, but
> has anybody found a good workaround to get "blame" output to
> highlight mostly like the underlying code?
>
> Or, if there's some magic plugin/setting that grants my wish, I'd be
> open to that too ;-)
>
> FWIW, most of my code is python, so the text in question might look
> something like
>
> 4 tchase if foo == bar:
> 4 tchase frob(thing)
> 8 jsmith wheedle(thing, foo)
> 21 mpolo zippidy(do_dah)
> 4 tchase log.info("Dronking the doozie")
>
> (the "blame" leaders in each VCS differ, but can are
> self-consistent; the above is Subversion output of revision#, username).
>
> Thanks,
>
> -tim

I remember discussing this once. I think somebody suggested a plugin that
would split the output into two buffers—one containg just the blame leaders,
and the other containing the file text—and use two vsplit, scrollbind
windows to display the output. But, I don't remember whether that was a
suggestion or real working script. If the blame output also contains some
header information like ClearCase, which spits out the checkin comments of
each version at the top of the output, this could be placed in a third
buffer on the top of both vsplit windows.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: