sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
807 stars 39 forks source link

Multiple gutters (for gutter icons) #319

Open simonzack opened 10 years ago

simonzack commented 10 years ago

A lot of sublime text packages use the gutter, which causes gutter icon conflicts, for example the gdb package and the git change-tracking package.

A way to resolve this would be to allow multiple gutters so all the information can be displayed, which can be positioned either on the left or right. This would also improve visibility.

This isn't a new idea, lots of other editors/ides do this (e.g. jetbrains products). Would love to see this implemented.

hadees commented 9 years ago

Stacking them seems to make the most sense with maybe an override that lets you have icons for specific combinations like GitGutter + SublimeTextLint

edsadr commented 9 years ago

I know @titoBouzout marked this as a minor, but this was reported almost a year and a half ago, would be nice to see some plans for it? you expect something better supported when you are paying for a license ...

titoBouzout commented 9 years ago

if you purchased it you agreed with this http://www.sublimetext.com/eula

So don't come here to polemicize, in case you also didn't read the readme of this project, this is volunteer effort.

have a nice day..

thepuzzlemaster commented 9 years ago

@titobouzout how is this a volunteer effort when it's for a paid piece of software?

I am genuinely curious.

Is there anywhere where we can see a prioritized list of features?

Is there a more appropriate approach for showing our support for this feature than countless +1 posts here?

edsadr commented 9 years ago

wow ... that's a nice way to put it... this is a really hostile way to treat your customers, now I really really regret to support your project ... I used to be a Sublime evangelist ..

ghost commented 9 years ago

According to the README:

This is a bug tracker run by the community

The main contributors (owners) are nothing more than volunteer ST users and mostly skilled ST package developers. From what I've been able to perceive, they use their best judgement to mark an issue minor or major based on experience and the logic assumption that bugs have higher priority than enhancements.

From what I understand, this volunteer GH repo initiative was a way to better organize the long list of issues that were scattered all over the ST forum and not an official ST support page.

A major or minor issue here has the same chances of being fixed by ST's official dev, Jon, who I'm not even sure is aware of this initiative.

FichteFoll commented 8 years ago

Please also consider @jisaacks's comment regarding a new feature in is package GitGutter in the following issue: #1020.

FichteFoll commented 8 years ago

By the way, my suggestion is similar to @amatiasq's but utilizes a feat from @jisaacks's comment:

Prioritizing gutter icons by the region names, and a way for plugins to assign a default priority to their regions in the .add_regions call to cover most use cases already while still allowing users configurability on their part.

Packages would have to document their region names better for users to allow

Alternatively, plugins could just use a customizable setting for their gutter priority which would ease the management on ST's behalf.

doque commented 8 years ago

+1. I need to see linter errors before I see git gutter infos.

FichteFoll commented 8 years ago

Okay, stop it with the "+1"s please. I know that github does not support voting on its issue tracker, but I think we have enough of these now with 46 participants and even more comments.

If anyone posts another "+1" post below, I will lock this issue again. Which is sad, because people could have something viable to contribute. But this occurance is so rare it's not worth the spam.

g105b commented 8 years ago

While this issue doesn't stop ST working, it does stop a major part of lots of people's development lives. The flood of comments here shows how important it is to some, as it is me.

image

jisaacks commented 8 years ago

@g105b the previous post claims to lock this thread after another +1 so you add a giant image of one?

FichteFoll commented 8 years ago

Looks like a big "lock this issue" sign to me. As you wish.

To anyone who wants to contrinute to this issue in a meaningful way, feel free to poke me in ##sublimetext on freenode. I don't have a bouncer set up yet but I visit it daily so chances are you'll meet me there.

steffanredneck commented 6 years ago

Four years passed, the issue is not be implemented.

Sublime will fights it corner, Atom then VS Code mop up the hackers who can't use IDE.

FichteFoll commented 5 years ago

Probably worth mentioning that the mini_diff feature from the ST 3.2 release has mostly eradicated this need (but not entirely, which is why I'll leave the issue open).

IkorJefocur commented 4 years ago

6 years passed. We have nothing. That's why people migrating to VSCode.

jadatkins commented 4 years ago

That’s unfair. Sublime has built-in support for git now, which was one of the uses for the gutter. What do you still have multiple uses of the gutter for, outside of version control?

Klaster1 commented 4 years ago

What do you still have multiple uses of the gutter for, outside of version control?

For example, a bookmark on the same line as a BracketHighlighter bracket and a lint error. That's three gutter icons.

faaizajaz commented 3 years ago

For example, a bookmark on the same line as a BracketHighlighter bracket and a lint error. That's three gutter icons.

And god forbid you should want to add debugger breakpoints by clicking the gutter...that's 4.

wbond commented 3 years ago

I think the thing missing in the conversation here is some ideas about how it would look visually sane, and be usable to have 4 rows of gutter icons.

Asking for more and more features without putting thought into the usability and impact of such features leads to a mess. We definitely tend to take amore cautious approach.

For instance, we have the ability for VCS plugins to mark modified regions now through the API. We did not end up using gutter icons because those aren't a great solution for marking deleted lines, and ideally the markers should be something minimal and unobtrusive.

The remaining use cases that have been expressed are:

Linter info would ideally now use the upcoming "annotations" feature, which take a message and draws it stuck to the right-hand side of the edit pane.

For debugger break points, we haven't yet taken a pass at expanding the API and UI to allow for seamless debugger integration. Thus, we currently are left with the possibility of bookmarks and debugger break points conflicting.


Rather than add multiple sets of gutter icons, I think I'd approach it from adding the ability to add something I'm going to call "line markers" that would have an automatic style, probably akin to a line highlight, but with some form of arrow pointing towards the line. The approach would allow a gutter icon (such as a bookmark), an incremental diff marker, a line marker and a linter annotation all to be present on a single line, and each be immediately visible, and not require there be a "mega gutter" present.


Thinking about, and expressing such ideas, is probably more useful than comments along the line of "X years and still not implemented". There are many IDEs out there that implement all of these ideas already. However, most users of Sublime Text are looking for something that those IDEs lack, and we make an effort to approach solving tasks by balancing how we'd like to see it approached, along with keeping things simple, fast and easy to use.

deathaxe commented 3 years ago

First of all: I absolutely agree. I don't recall where, but I saw multi-column gutters somewhere recently and found it a bit bloating. It either used too much empty space or was messed with dozens of icons.

What comes to my mind is:

In situations of several icons at a row, it would propably be enough to have some kind of popup or flyout when hovering the gutter area, which then would show all icons and/or further information for each region.

Maybe it could be handled by a plugin via ordinary popups if it could query existing regions for that line (e.g. view.get_regions_for_line(0815)) with some info about the icons to display etc.

This might then lead to a need to somehow handle conflicting show_popup() calls from different plugins though, maybe by merging their content into one or something like that - not quite sure.

... we have the ability for VCS plugins to mark modified regions now through the API.

You mean API allows to set_reference_document() to feed ST's incremental diff with information to compare the content against?

... Linter info would ideally now use the upcoming "annotations" feature, ...

Nice idea, but may also look a bit messy with too many of them as they try to use as much space as possible beginning from the end of the line if the annotation text is long enough, don't they? If they keep on the very right the space between the end of the line and the annotation may be quite large in some situations which may make it hard to keep track of the line they belong to. Except distraction free mode it is more common to have the text aligned to the left, so it's easier to track the icon<->row.

Annotations are nice for showing build errors and they play well to show a single annotation with blame information in GitGutter, but I am not sure if I would like to have dozens of them jumping in and out frequently each time a linter finds something to complain about.

As linters already underline faulty code gutter icons might not even be needed except for situations in which they point to the start of a line. I can remember SublimeLinter showing dozens of boxes at the beginning of a line in such situations - terrible. Maybe a subtile "line marker" would be better then.

Disclaimer

Expressing just some quick thoughts. With incemental diff in the house the only use case for gutters are linter markers from LSP on my end.

rwols commented 3 years ago

Nice idea, but may also look a bit messy with too many of them as they try to use as much space as possible beginning from the end of the line if the annotation text is long enough, don't they?

Yeah, played around with this some months ago (showing the linter messages as annotations), but it overwhelms too quickly.

wbond commented 3 years ago

Did you put all of the linter details in there, or just a note with the option to show a popup with full details?

wbond commented 3 years ago

In situations of several icons at a row, it would propably be enough to have some kind of popup or flyout when hovering the gutter area, which then would show all icons and/or further information for each region.

My concern with such an idea is that we begin where we started - now there is going to want to be control over plugins and/or users getting to decide priority as to which is shown on "top" before the fly-out menu is shown.

rwols commented 3 years ago

Did you put all of the linter details in there, or just a note with the option to show a popup with full details?

I managed to find a .webm that I made from a few months ago: https://file.charleshd.com/r/7YT87iezaN#YKdVPkPcm/cTQ/L3ZTxYjN5AnCtwPKpq5yMQz3VAYnA= (valid for 30 days)

You may be right in that it would be better to have a small note :)

The remaining use cases that have been expressed are: Linter annotations Linter info would ideally now use the upcoming "annotations" feature, which take a message and draws it stuck to the right-hand side of the edit pane.

To be honest I don't think lint results are in the same ballpark as bookmarks and debugger breakpoints. Bookmarks and breakpoints span a line. They are attached to lines. Whereas lint results:

deathaxe commented 3 years ago

Linter

They markup reagions by underlining code. It's quite obvious in both the editor and the minimap. Severity is expressed by colors (green,yellow,red). Hence gutter icons are normally not needed.

The only thing missing is a sane way to highlight errors which point to the whole line by either underline everything (too much) or just the first character of a line (see SL's empty box), which both don't create a nice user experience. A little marker would look nicer then.

Icons would make sense only if there are many different kinds of issues which are expressed by different icons. Haven't seens something like that though.


Bookmars

They just highlight a line in a certain way. The icon is always the same as there is only one type of bookmarks.

Would it be reasonable to just render a bookmarked line number bold, underlined, in another color or with a trailing asterisk to make it stand out?

A quick and dirty - not perfect mockup:

grafik

Not sure if something like that would be useful for breakpoints as well, but a dedicated icon may be more stateful here.