Jakson A. Aquino wrote:

> When running diff without options, removed lines are separated of
> added ones by '^---$'. This pattern gets interpreted as diffRemoved
> when it is not. I think the pattern can be classified as diffLine. If
> I'm not interpreting it wrongly the attached patch fix this tiny bug.

Yeah, diffRemoved is not right, I'll include the change.

> Locale problem: The diff in languages other than English may generate
> output that doesn't match the patterns for diffOnly, diffDiffer, etc.
> because diff messages get translated in some languages. To fix this
> for my locale (pt_BR.UTF-8) I've put in my
> ~/.vim/after/syntax/diff.vim the following lines:
> 
> syn match diffOnly      "^[A-Z].*"
> syn match diffIdentical "^[A-Z].*"
> syn match diffDiffer    "^[A-Z].*"
> syn match diffBDiffer   "^[A-Z].*"
> syn match diffIsA       "^[A-Z].*"
> syn match diffNoEOL     "^[A-Z].*"
> syn match diffCommon    "^[A-Z].*"
> 
> I repeated the same pattern because sometimes I use the terminal
> emulator in English and the above patterns will still be fine. A more
> general solution would be to define the above syntax elements first
> using the pattern "^\S.*" and, then, define the other syntax elements.
> This approach would have at least one shortcoming: the distinction
> between diffOnly, diffidentical, etc. would be lost.

But using the same pattern will mean one of them wins, you can leave out
all the others.

I think the only real solution would be to include the translations.
I found the German one, but most others result in English for me.

syn match diffOnly      "^Only in .*"
syn match diffOnly      "^Nur in .*"


-- 
I used to be indecisive, now I'm not sure.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui