如何讓Git在代碼語法突出顯示的終端顯示差異,就像GitHub所做的那樣?我的意思不僅是綠色的添加和紅色的刪除,但也與代碼語法高亮。Syntax Highlighted Diffs
2
A
回答
2
代碼語法突出顯示不直接與git一起使用。
什麼可總結的「Vive la git diff!」,與像公用事業:
$ git diff ‐‐color-words
# or
$ git diff | ~/src/git/contrib/diff-hightlight/diff-highlight
It was the best of times,
-it was the **blu**rst of times.
+it was the **wo**rst of times.
(在**xx**
部分實際上是有色)
但這些亮點不依賴於語言本身。
像git diff-so-fancy
這樣的更復雜的擴展仍然是着色差異塊,而不是代碼語法。
poke提到in the comments比較工具semanticmerge.com,它知道更多有關文件的語文顯示差異:看到它的configuration with git。
相關問題
- 1. django popen「invalid syntax」
- 2. mysql_result SHOWING SYNTAX ERROR
- 3. CMakelist - if(DEFINED)syntax
- 4. itun.es URL shortener syntax
- 5. for-each syntax cast
- 6. C++ Builder Syntax Highlighter
- 7. Array.from()vs spread syntax
- 8. Dependent Observable syntax woes
- 9. python class syntax mess
- 10. Markdown syntax less(pager)
- 11. Mysql Like Syntax
- 12. PHP「或」Syntax
- 13. snippet:jQuery syntax highlighter
- 14. Freemarker Syntax Netsuite
- 15. Addwithvalue cause syntax error
- 16. Swift Image Syntax
- 17. SQL SELECTION SYNTAX
- 18. Coq:`Function ... with` syntax
- 19. 「while:Expression Syntax」in FreeBSD
- 20. Casting Errors Invalid Syntax
- 21. one C++ syntax question
- 22. python raw_input()syntax
- 23. MYSQL SYNTAX JOIN
- 24. Dot Syntax Issue
- 25. mysql select syntax
- 26. in line syntax highlighter?
- 27. 捕獲React Diffs並手動修補
- 28. 使用vimdiff查看所有`git diffs'
- 29. sqlite3「OperationalError:near」)「:syntax error」python
- 30. Select Count Distinct Syntax,vb.net
我懷疑Git提供的原始工具是否可行。您可能希望升級到更全面的差異化工具。 – Makoto