Wednesday, June 30, 2010

Re: vimdiff-like highlighting within the same file?

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 ""\)/\=submatch(1).substitute(submatch(2), '#| ', '', 'g').submatch(4)/
> :nohls
> :diffthis
:set hidden
> :wincmd w
:wincmd o
> :diffthis
>
> Modifications are now highlighted in the new string -- but not in the old
> string.

Cool ;)

Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)

No comments: