Re: vimdiff-like highlighting within the same file?

2010-09-02 Thread Adam Monsen
Neil Fraser's diff_match_patch ... might be of interest. Awesome! Thanks for the pointer, James! The Python version of diff-match-patch seems to work pretty dang well. I did a few quick tests with diff_main() and diff_cleanupSemantic(). The API is simple, clear, and predictable! This could be

Re: vimdiff-like highlighting within the same file?

2010-09-01 Thread James Cole
Hi, ...I'm trying to use Vim script identify areas in unified diffs showing changes in lines (as opposed to additions or deletions) and use a more striking highlighting mode to point out, say, when a single letter or space changes in a line. ... To see how other tools highlight stuff,

Re: vimdiff-like highlighting within the same file?

2010-08-31 Thread Adam Monsen
I'm still hacking on my highlight only version, but it's slow going. Please share! I don't really have anything useful to share at this point, but I can tell you where I'm at. I'll start at the beginning so folks can join in even if they've missed earlier posts in this thread. I want improved

Re: vimdiff-like highlighting within the same file?

2010-08-26 Thread Christian Brabandt
Hi Adam! On Do, 26 Aug 2010, Adam Monsen wrote: This is an experimental feature, but please try it out. I did, and I'm impressed! Nice work! This is actually a novel way to tweak a diff, if one wanted to do such a thing. The only issue I ran into was when I did :only! in the window with

Re: vimdiff-like highlighting within the same file?

2010-08-25 Thread Adam Monsen
This is an experimental feature, but please try it out. I did, and I'm impressed! Nice work! This is actually a novel way to tweak a diff, if one wanted to do such a thing. The only issue I ran into was when I did :only! in the window with the original .diff file I got a bunch of errors. I'm

Re: vimdiff-like highlighting within the same file?

2010-08-22 Thread Christian Brabandt
Hi Adam! On Fr, 20 Aug 2010, Adam Monsen wrote: How would you like the plugin to handle that automatically. If you make good suggestions, I might implement that. Do you mean the narrow region plugin? Actually, that plugin may not be involved at all. Here's a use case for what I'm

Re: vimdiff-like highlighting within the same file?

2010-08-20 Thread Andy Wokula
Am 30.06.2010 11:59, schrieb Andrei Popescu: On Mi, 30 iun 10, 11:12:03, Christian Brabandt wrote: On Wed, June 30, 2010 10:52 am, Andrei Popescu wrote: I'm trying to add new features to vim's handling of .po files. How could I highlight the differences between the current msgid and the

Re: vimdiff-like highlighting within the same file?

2010-08-20 Thread Christian Brabandt
Hi Adam! On Do, 19 Aug 2010, Adam Monsen wrote: May I suggest that you look into Christian Brabandt's NarrowRegion plugin. A procedure, after having installed NarrowRegion: * edit buffer * select lines with V * :NR(this will make a narrow region buffer holding just those lines)

Re: vimdiff-like highlighting within the same file?

2010-08-20 Thread Adam Monsen
How would you like the plugin to handle that automatically. If you make good suggestions, I might implement that. Do you mean the narrow region plugin? Actually, that plugin may not be involved at all. Here's a use case for what I'm envisioning. (1) one plain text file in unified diff format

Re: vimdiff-like highlighting within the same file?

2010-08-19 Thread Adam Monsen
FYI, I also asked this question on stackoverflow.com: http://tinyurl.com/363f8he Someone posted a response to that question. Apparently there's another editor that does highlight intra-line differences in a unified diff file. It's interesting, it works... I tried it out. Having used Vim for

Re: vimdiff-like highlighting within the same file?

2010-08-19 Thread Charles Campbell
Adam Monsen wrote: FYI, I also asked this question on stackoverflow.com: http://tinyurl.com/363f8he Someone posted a response to that question. Apparently there's another editor that does highlight intra-line differences in a unified diff file. It's interesting, it works... I tried it

Re: vimdiff-like highlighting within the same file?

2010-08-19 Thread Adam Monsen
May I suggest that you look into Christian Brabandt's NarrowRegion plugin. A procedure, after having installed NarrowRegion: * edit buffer * select lines with V * :NR(this will make a narrow region buffer holding just those lines) * select other lines with V * :NR * in each

Re: vimdiff-like highlighting within the same file?

2010-07-12 Thread Adam Monsen
FYI, I also asked this question on stackoverflow.com: http://stackoverflow.com/questions/3231759/how-can-i-visualize-per-character-differences-in-a-unified-diff-file (same link, tiny: http://tinyurl.com/363f8he ) -- You received this message from the vim_use maillist. Do not top-post! Type your

Re: vimdiff-like highlighting within the same file?

2010-07-01 Thread Efraim Yawitz
I've also wanted to do diffs within the same file, and now I'm thinking that this is really just a special case of something more general that may have other uses (although I haven't thought of them yet). The concept here is virtual buffers which would represent a portion of a file, or more

Re: vimdiff-like highlighting within the same file?

2010-07-01 Thread Charles Campbell
Efraim Yawitz wrote: I've also wanted to do diffs within the same file, and now I'm thinking that this is really just a special case of something more general that may have other uses (although I haven't thought of them yet). The concept here is virtual buffers which would represent a

vimdiff-like highlighting within the same file?

2010-06-30 Thread Andrei Popescu
Hello, I'm trying to add new features to vim's handling of .po files. How could I highlight the differences between the current msgid and the previous one? #, fuzzy #| msgid #| The following disk access storage devices (DASD) are available. Please #| select each device you want to use one at

Re: vimdiff-like highlighting within the same file?

2010-06-30 Thread Marc Weber
I'd be grateful for any hints or RTFM pointing to the right FM, because I have no idea where to start. I don't know details. I'd guess that the highlighting is implemented somewhere in Vims C code. But I don't know for sure. You can always write a script which creates two files you can diff

Re: vimdiff-like highlighting within the same file?

2010-06-30 Thread Christian Brabandt
On Wed, June 30, 2010 10:52 am, Andrei Popescu wrote: I'm trying to add new features to vim's handling of .po files. How could I highlight the differences between the current msgid and the previous one? I don't understand your question. Can you elaborate, on what the file looks like and where

Re: vimdiff-like highlighting within the same file?

2010-06-30 Thread Marc Weber
Hi Christian, Excerpts from Christian Brabandt's message of Wed Jun 30 11:12:03 +0200 2010: I don't understand your question. Can you elaborate, on what the file looks like and where the previous message id comes from? Please show a sample file, with which we can see your problem. He gave an

Re: vimdiff-like highlighting within the same file?

2010-06-30 Thread Christian Brabandt
On Wed, June 30, 2010 11:59 am, Andrei Popescu wrote: What I posted was an excerpt of a .po file. Here is a full string with comments: [blank line] #. Type: select #. Description #. :sl5: #: ../s390-dasd.templates:1002 ^^ other stuff, not interesting in this

Re: vimdiff-like highlighting within the same file?

2010-06-30 Thread Andrei Popescu
On Mi, 30 iun 10, 12:30:15, Christian Brabandt wrote: I would use the NarrowRegion plugin[1]. Make sure, it uses vertical split windows, (:let g:nrrw_rgn_vert = 1), set nowinfixwidth in each narrowed window (:set nowinfixwidth), resize each window to your desired width and diff each narrowed

Re: vimdiff-like highlighting within the same file?

2010-06-30 Thread Marc Weber
Excerpts from Andrei Popescu's message of Wed Jun 30 13:19:23 +0200 2010: On Mi, 30 iun 10, 12:30:15, Christian Brabandt wrote: I would use the NarrowRegion plugin[1]. Make sure, it uses vertical split windows, (:let g:nrrw_rgn_vert = 1), set nowinfixwidth in each narrowed window (:set

Re: vimdiff-like highlighting within the same file?

2010-06-30 Thread Andrei Popescu
On Mi, 30 iun 10, 13:32:22, Marc Weber wrote: Can't you just provide two files? The old and the new one? Most VCS systems do that anyway vimdiff can be used (but it's not ideal) if you have access to the previous .po file, but this is not always the case. Especially bigger projects will

Re: vimdiff-like highlighting within the same file?

2010-06-30 Thread Marc Weber
Because the previous msgid is not needed in the translated .po file I thought of pre-processing the .po file[1]. Unfortunately I don't have the programing skills for that either :( Can you describe this preprocessing? What do you expect from the highlighting? one line: Hello World two

Re: vimdiff-like highlighting within the same file?

2010-06-30 Thread Jürgen Krämer
Hi, Andrei Popescu wrote: On Mi, 30 iun 10, 13:32:22, Marc Weber wrote: Can't you just provide two files? The old and the new one? Most VCS systems do that anyway vimdiff can be used (but it's not ideal) if you have access to the previous .po file, but this is not always the case.

Re: vimdiff-like highlighting within the same file?

2010-06-30 Thread Andrei Popescu
On Mi, 30 iun 10, 15:42:37, Jürgen Krämer wrote: maybe the following can be a start. Open your .po file and execute these commands (the fourth command is one long line): :%y :vert new :put! :%s/^\(#| msgid \n\(\_.\{-\}\n\)msgid \n\)\(\_.\{-\}\n\)\(msgstr