2

Git-fugitive provides a terrific blame view (:Gblame) as seen here with the commit ID shown on the far left:

ae228e74 (Dotan Cohen 2013-06-30 14:55:45 +0300)| 71         if operation == '-':
9a5d1a16 (Dotan Cohen 2013-06-26 18:59:55 +0300)| 72             sys.exit()
9a5d1a16 (Dotan Cohen 2013-06-26 18:59:55 +0300)| 73         elif operation == '1':
1e4f1463 (Dotan Cohen 2013-07-02 20:18:49 +0300)| 74             system_statistics.main(env)
9a5d1a16 (Dotan Cohen 2013-06-26 18:59:55 +0300)| 75         elif operation == '2':
016fe2a8 (Dotan Cohen 2013-10-30 12:18:04 +0200)| 76             configure_system.main(env)
5835f826 (Dotan Cohen 2013-07-02 20:17:31 +0300)| 77         elif operation == '3':
016fe2a8 (Dotan Cohen 2013-10-30 12:18:04 +0200)| 78             configure_websites.main(env)
9b09a876 (Dotan Cohen 2013-07-08 14:43:46 +0300)| 79         elif operation == '4':
016fe2a8 (Dotan Cohen 2013-10-30 12:18:04 +0200)| 80             configure_email.main(env)
016fe2a8 (Dotan Cohen 2013-10-30 12:18:04 +0200)| 81         elif operation == '5':
9b09a876 (Dotan Cohen 2013-07-08 14:43:46 +0300)| 82             install_applications.main(env)
016fe2a8 (Dotan Cohen 2013-10-30 12:18:04 +0200)| 83         elif operation == '9':
016fe2a8 (Dotan Cohen 2013-10-30 12:18:04 +0200)| 84             auxiliary_pages.main(env)
9a5d1a16 (Dotan Cohen 2013-06-26 18:59:55 +0300)| 85         else:
9a5d1a16 (Dotan Cohen 2013-06-26 18:59:55 +0300)| 86             print("Invalid input!")

In vim, all commit IDs are the same colour and thus it is difficult to discern which lines were from the same commits. How might one configure git-fugitive to display each commit IDs in a different colour?

dotancohen
  • 30,064
  • 36
  • 138
  • 197
  • One could read Fugitive's documentation or maybe its code or simply send a feature request to its author. – romainl Oct 12 '14 at 09:24
  • @romainl: Thank you. [This](https://github.com/tpope/vim-fugitive/blob/master/plugin/fugitive.vim#L1844) seems to be the relevant part of the source. I note that neither the documentation nor googling reveal this feature. Before I hack at the source I wonder if anybody had ever encountered such a need (seems fairly useful and obvious), thus I ask here. – dotancohen Oct 12 '14 at 09:57

1 Answers1

5

Fugitive already has this feature. It seems to depend on the number of colors your terminal supports and if you have CSApprox.

Peter Rincker
  • 43,539
  • 9
  • 74
  • 101