Friday, February 23, 2018

Re: vimdiff - how to jump to next difference in long line - shortcut ]c does not work

Le vendredi 23 février 2018 18:43:35 UTC+1, Igor Forca a écrit :
> @Arun, I have tested your code in deep. It is working perfectly. What I have found is little trouble in the case when first line include the change.
>
> File1:
> aaa ccc
> aaa ccc
>
> File2:
> aaa bbb
> aaa bbb
>
> If cursor is in file1 at first line first column, diff enabled and pressing ]x I expect cursor to jump to first line first c letter, but it jumps to second line first c character. It looks this problem only appears if difference is in first line. If difference is any other line but first one the problem does not appear.
>
> @Rick, thanks for providing the info about diffchar plugin. I tested it and it is awesome. I will definitely use it for projects when I work with code. But for projects where I analyze huge data files like long lines and 3000+ rows, this plugin is understandably little bit slow. Thanks.

Windows' like F3 key :

nnoremap <expr> <F3> &diff ? ']c':''
nnoremap <expr> <S-F3> &diff ? '[c':''

works fine and similar to Windows search.

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: