[vim/vim] VIM Editor - TOhtml is not capturing the word differences (#1725)

已查看 100 次
跳至第一个未读帖子

sandosh143

未读,
2017年5月25日 15:52:122017/5/25
收件人 vim/vim、Subscribed

I am using the "diffchar.vim" plugin to get the character level differences between 2 files. In the terminal I am able to see the character differences but when I try to convert that to html using :TOhtml, its not capturing the character differences. Its capturing only the line differences.

Version-Release number of selected component (if applicable): Vim (version: 7.4.629)
Operating system/version: CentOS release 6.8 (Final) 2.6.32-642.1.1.el6.centos.plus.x86_64
Terminal name/version: /dev/pts/1
$TERM: xterm

Steps to Reproduce:
Install the diffchar.vim plugin and run the below command to compare the two files using "vimdiff" or "vim -d"

vimdiff <file1> <file2> -c :TOhtml -c wqa

Actual results:
In the terminal you will be able to see the character level differences but when you convert that to html file its showing the line differences.

line difference

Expected results:
Both in the terminal & html we need to see the character level differences.

exact difference


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

Rick Howe

未读,
2017年5月30日 04:56:272017/5/30
收件人 vim_dev、v...@noreply.github.com、subsc...@noreply.github.com、reply+00b1d19879deee6faab62d603c10d9c0688ad1c...@reply.github.com、vim-dev...@256bit.org
Thank for using diffchar.vim. TOhtml takes only syntax highlightings for colors, but diffchar.vim uses matchadd ones. I modified 2html.vim, which is located in $VIMRUNTIME/syntax directory, to handle them in diff mode. Please try it and use the latest diffchar.vim as well.
2html.zip

Christian Brabandt

未读,
2017年5月30日 05:00:592017/5/30
收件人 Rick Howe、vim_dev、reply+00b1d19879deee6faab62d603c10d9c0688ad1c...@reply.github.com
Note, there is an open issue on the tohtml repository to take match()
functions into account:
https://bitbucket.org/fritzophrenic/vim-tohtml/issues/9/suggestion-question-option-to-export-to

You might want to contribute your 2html patch there.

Best,
Christian
--
Vati, was heißt "FORMATIERE LAUFWERK C:?"

sandosh143

未读,
2017年6月1日 15:18:312017/6/1
收件人 vim/vim、vim-dev ML、Comment

Sorry for the stupid question. Do I need to use "diff" command if I need to use "2html.vim"? Please assist.


You are receiving this because you commented.

vim-dev ML

未读,
2017年6月1日 15:18:442017/6/1
收件人 vim/vim、vim-dev ML、Your activity

vim-dev ML

未读,
2017年6月1日 15:18:442017/6/1
收件人 vim/vim、vim-dev ML、Your activity
Thank for using diffchar.vim. TOhtml takes only syntax highlightings for colors, but diffchar.vim uses matchadd ones. I modified 2html.vim, which is located in $VIMRUNTIME/syntax directory, to handle them in diff mode. Please try it and use the latest diffchar.vim as well.

vim-dev ML

未读,
2017年6月1日 15:19:052017/6/1
收件人 vim/vim、vim-dev ML、Your activity
Thank for using diffchar.vim. TOhtml takes only syntax highlightings for colors, but diffchar.vim uses another ones. I modified 2html.vim, localted at $VIMRUNTIME/syntax directory, to handle them. Please try it and use the latest diffchar.vim as well.

vim-dev ML

未读,
2017年6月2日 02:37:042017/6/2
收件人 vim/vim、vim-dev ML、Your activity
You can simply run TOhtml as you did,
after replacing your $VIMRUNTIME/syntax/2html.html with my modified one.

Rick Howe

未读,
2017年6月2日 03:51:392017/6/2
收件人 vim_dev、v...@noreply.github.com、subsc...@noreply.github.com、reply+00b1d19879deee6faab62d603c10d9c0688ad1c...@reply.github.com、vim-dev...@256bit.org
回复全部
回复作者
转发
0 个新帖子