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

100 visualitzacions
Ves al primer missatge no llegit

sandosh143

no llegida,
25 de maig 2017, 15:52:1225/5/17
a 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

no llegida,
30 de maig 2017, 4:56:2730/5/17
a 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

no llegida,
30 de maig 2017, 5:00:5930/5/17
a 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

no llegida,
1 de juny 2017, 15:18:311/6/17
a 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

no llegida,
1 de juny 2017, 15:18:441/6/17
a vim/vim,vim-dev ML,Your activity

vim-dev ML

no llegida,
1 de juny 2017, 15:18:441/6/17
a 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

no llegida,
1 de juny 2017, 15:19:051/6/17
a 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

no llegida,
2 de juny 2017, 2:37:042/6/17
a 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

no llegida,
2 de juny 2017, 3:51:392/6/17
a vim_dev,v...@noreply.github.com,subsc...@noreply.github.com,reply+00b1d19879deee6faab62d603c10d9c0688ad1c...@reply.github.com,vim-dev...@256bit.org
Respon a tots
Respon a l'autor
Reenvia
0 missatges nous