-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
some comments and suggestion.. #26
Comments
g:DiffUnit can be used to change a diff unit like 'Char' and 'Word1'. You can define a command to toggle between them:
When g:DIffUnit = 'Word1' and comparing '123' and 'foo.123.foo', the first 'foo.' and the last '.foo' are highlighted in DiffAdd. Original vim never uses DiffAdd in a changed line, though.
I just followed a sample plugin described in |
oh.. good.. but looks that's not exactly like native way, to complex code content, sometime native way had advantage.
the hl of 'diffadd' by that looks confused with added lines, perhaps better to keep like native 'difftext', IMO.
yea, i see, but problem is user perhaps did not map one, meantime he/she Not like to get be mapped by this plugin either. |
IMO: this plugin had advantage when to compare text style content, and with your another 'spotdiff.vim' plugin, to compare by range by needing had much useful. |
Please use
|
to me, i think user probably just care those words (if word as unit) were diff, how should i knew which were added which were just changed, meant probably just care/knew 'lazy' --> 'swift brown' at first and 'swift brown' --> 'lazy' at next.
try something like this: " Configurable Keymaps
if get(g:, 'diffchar_mapping', 0)
for [key, plg, cmd] in [
\['[b', '<Plug>JumpDiffCharPrevStart',
\':call diffchar#JumpDiffChar(0, 0)'],
\[']b', '<Plug>JumpDiffCharNextStart',
\':call diffchar#JumpDiffChar(1, 0)'],
\['[e', '<Plug>JumpDiffCharPrevEnd',
\':call diffchar#JumpDiffChar(0, 1)'],
\[']e', '<Plug>JumpDiffCharNextEnd',
\':call diffchar#JumpDiffChar(1, 1)'],
\['<Leader>g', '<Plug>GetDiffCharPair',
\':call diffchar#CopyDiffCharPair(0)'],
\['<Leader>p', '<Plug>PutDiffCharPair',
\':call diffchar#CopyDiffCharPair(1)']]
if !hasmapto(plg, 'n') && empty(maparg(key, 'n'))
execute 'nmap <silent> ' . key . ' ' . plg
endif
execute 'nnoremap <silent> ' plg . ' ' . cmd . '<CR>'
endfor
endif |
ideally, yea, combine those 2 and ':TDWord' and 'spotdiff.vim' To:
// well, just my option, i felt this good for text style content compare, and by this way, would be more useful to be common usage. |
i've forgot what i said, but should be out-date anyway.. closing.. |
Hi... looks this is a good enhancement (with your another 'spotdiff.vim') vs native vimdiff
// we can see really sometime can not clearly show what chars were different in a line..
// native vimdiff looks compared by line (due to 'patient' algo?!)
// sometime not clear the isk/diff unit, but just the diff in a line..
though it had advantage also,
if appended a 'o' to 'fo', maybe just like to show the 'o' was the diff, not the whole word 'foo'.
so far just a rough feeling, maybe others...... and sorry if bother...........
The text was updated successfully, but these errors were encountered: