yhd*_*ung 10 diff export file visual-studio-code
Visual Studio Code 具有内置功能,可以在 UI 上比较两个文件的差异。
我在 Windows 上使用 VS Code。有没有一种方便的方法将差异导出到文本或 HTML 文件中,例如使用 unix shell 命令diff
或vimdiff
?
yhd*_*ung 13
不是专门使用 VS Code:
导出为 HTML,如果 Windows 可以运行vimdiff
shell 命令:
vimdiff -c TOhtml -c "w vimdiff_export.html | qa!" file1 file2
Run Code Online (Sandbox Code Playgroud)
使用以下命令导出为文本diff
:
diff file1 file2 > diff_export.txt
Run Code Online (Sandbox Code Playgroud)
或者使用Windows命令行fc
(文件比较)命令:
fc file1 file2 > fc_export.txt
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
10806 次 |
最近记录: |