Open sandosh143 opened 7 years ago
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.
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.
On Di, 30 Mai 2017, Rick Howe wrote:
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.
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:?"
Sorry for the stupid question. Do I need to use "diff" command if I need to use "2html.vim"? Please assist.
You can simply run TOhtml as you did, after replacing your $VIMRUNTIME/syntax/2html.html with my modified one.
I tried using this modified 2html.vim file but its not working. Getting this error while executing.
$ vim -d old_172.30.78.101 new_172.30.78.101 -c :TOhtml -c wqa 2 files to edit "old_172.30.78.101.html" [New File] Error detected while processing /home/test/.vim/plugin/2html.vim: line 725: E121: Undefined variable: g:loaded_2html_plugin E116: Invalid arguments for function extend Press ENTER or type command to continue
I placed the file in $VIMRUNTIME/syntax/ directory. When i do a TOhtml its highlighting only the first occurance of difference. Its not highlighting the other occurances in the same line. Its just moving to the next line. Can you please help?
I am using vim8.1 from vim.org (self installing executable), with latest diffchar.vim plugin. Which 2html.vim i should use to export html in the same format as it is seen in vim. Thank you!
I suppose the 2html plugin does not notice that the diffchar.vim plugin was used and highlights the diff differently. I think it doesn't handle the matchadd()
functionality yet.
Related 2html issue: https://bitbucket.org/fritzophrenic/vim-tohtml/issues/9/suggestion-question-option-to-export-to
Is there any other option to get export of vim diff? It is not necessary to be html.
What do you mean with export of vim diff? I think all you can do is share the patch file.
I am working on a script, which uses vim diff to compare two csv files. I want to get result of vim diff written in file, as for example:TOhtml. But with :TOhtml I can’t get the same output as it is seen directly in vim (with diffchar plugin). Now I am asking if there is any other option to get identical output as in vim directly.
What do you mean by sharing patch file?
Thank you!
git diff --no-index
plus e.g. using diff-highlight from git.
Please ask user questions on the vim_use mailinglist or use vi.stackexchange.com. This here is a bug tracker for problems with Vim. We cannot provide individual help here
No new status on this, but the migrated issue tracker for adding matchadd() tohtml is here: https://sourceforge.net/p/vim-tohtml/issues/9/
That does seem like something I'll want to prioritize for new features after I get bugfixes completed.
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.
Expected results: Both in the terminal & html we need to see the character level differences.