sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.74k stars 105 forks source link

Minor Visual FR: Make the tab title prettier #325

Closed chrisgrieser closed 1 year ago

chrisgrieser commented 1 year ago
image

(diffview file history is the right one)

It really isn't too pretty, probably since I do not use a bufferline/tabline plugin?

sindrets commented 1 year ago

"Tab titles", as in what gets displayed in the tabline is controlled by the :h 'tabline' option. You can customize this however you want.

The buffers in this plugin are semantically named with a URI structure. The names hold meaningful information about:

I won't set "pretty" buffer names, because buffer names should not be used as decoration. The buffer names are unique identifiers that, in this case, hold meaningful information that can be used in BufReadCmd and BufWriteCmd events etc.

The buffers created by the plugin are also set as 'nobuflisted' by default, and as such you shouldn't ever have to see them unless they are displayed in a window. And when they are displayed in a window, your 'tabline' and 'statusline' options will control how any information about those buffers are displayed in the editor.