tomtom/quickfixsigns_vim

configure gutter width

joeyh opened this issue · 7 comments

The plugin adds a 2 character wide gutter, but as I have it only configured to show git and quickfix signs, all signs appear in the first column, and the second is unused. I'd like to turn it off to save screen space, but I cannot find a way to do it in the documentation or source.

I could be wrong but I don't think users can configure the width of the
sign column. quickfixsigns itself doesn't do anything about the sign
column. IIRC the sign column is shown as soon as you place a sign. You
might want to ask at the vim user group if there is a way to configure
the width of the sign column. You're right that quickfixsigns makes use
only of one cell for textual signs. Images are displayed in 2 cell
width, though. I guess that's also the reason why the column is 2 cells
wide.

vhda commented

Why not merging the symbols?
For example, if git is set in the first column and quickfix in the second all information would available, don't you think?

VIM's sign API doesn't provide for such a thing. You can only display one sign per line. You could of course write a library that handles this for you and somehow merges multiple signs on a line (and quickfixsigns was originally intended as such an approach) but then all plugins would have to use this library, which won't happen unless it becomes part of standard vim. And this most likely won't happen either.

vhda commented

But isn't quickfixsigns setting the sign value to "-1" when one line was deleted when compared with git HEAD? And if it is, why can't it set it to "+A" when there is a new line and the mark A?

You'd have to define new signs for all possible combinations but you
still wouldn't be able to deal with graphical signs. A better approach
would be to rotate signs at the same line but that's complex too.

IMHO it's a waste of time trying to display multiple signs in the sign
column. VIM isn't prepared for that. Quickfixsign will display mulitple
signs in the balloon text, which IMHO is sufficient. Most other editors
I know handle this problem similar to VIM.

vhda commented

I understand your point and I agree that graphical signs are not easy to deal with, but I think you are focusing too much on gvim, which I assume is what you are using.
With standard vim there are no balloons and there are only text signs. Since there is no icon limitation and there are 2 columns available I really think this plugin would benefit from this by allowing "merging" up to 2 signs.

I don't think it's doable so that the result justifies time & effort that would goes into implementing this from a vimscript plugin. One could of course change the VIM source code to do what you want but this would have to be implemented by somebody else who has too much spare time.