Open mjomble opened 9 years ago
This should have been in atom since day one. If you can add a bookmark, and style the gutter line number section, you should be able to style the line itself. It seems like a basic and common necessity for an editor like Atom, which prides itself of flexibility and customization through a wide array of themes and packages. Yes, we can create a package to "hack it", but we shouldn't have to. The "bookmarked" class on the gutter and not on the line number, just shows someone only thought out the bookmark process half way. Seriously, a few lines and push the update. It would take only a few minutes to add this feature baked into the next Atom release.
I CAN NOT BELIEVE that this has been going on for over a year, and it still isn't built into Atom. It is a huge let down. I hate seeing something so easy, simple, and duh should have been there from the beginning, get ignored!
This issue has fallen through the cracks, and someone responsible for Atom's updates/code fixes/modifications should add it.
I want to add, that I manually added the Atom "bookmarks" package via apm develop bookmarks
, and manually added the changes purposed in PR #67 . Then of course, wrote my own style in styles.less.
It works just fine, no issues.
This looks super simple, and mimics exactly how the bookmarked class is added to the gutter line. I can't fathom how there would be any issues with these few minor lines.
This PR #67 should be merged. Until then, you can add the modifications yourself 👍
I hacked a stylesheet-based solution that may be able to hold us over:
atom-text-editor .gutter .bookmarked {
background: rgba(0,153,204,.15);
padding-right: 1024px; //arbitrary large width
pointer-events: none;
border-left: 2px solid #09C; //optional gutter decoration
z-index: -1;
color: rgba(255,255,255,.5);
transition: color .1s linear; //smooth transition
&.cursor-line {
color: #fff;
}
Ends up looking like this:
@round This issue is not regarding the gutter. It is about the actual line itself. The CSS classes targeted in your post point to the gutter.
Without modifying the Atom bookmark plugin, it is not possible. The line itself is not given any bookmark
class we can use.
So either:
@WadeShuler I hear you – even agree with you.
As I mentioned, what I shared is a hack that visually highlights the bookmarked line(s), without having/needing the ability to alter the actual classes of the line.
Doesn't solve the issue, but may help folks looking for an interim fix.
@WadeShuler Any chance you could post a step-by-step on how to implement the changes? I've been trying to get it to work for the better part of this evening but can't figure it out.
I'm on Windows 10 if that is important
Would REALLY appreciate it!!
@Spherikal I don't remember right now lol. I swapped to VSCode for a while, and think I lost it with an Atom update. If I get some spare time, I might revisit this issue.
A year later and still no solution... I swapped to VSCode for a while over this, came back to Atom because it's comfortable. Might have to swap back to VSCode again to see if I can't make the switch permanent.
If this holdup is all because of the selective bookmark feature (#47) , then remove it. There really is no need to bookmark a specific section of one line. It doesn't matter if it's the 34th char of the row. Bookmarking col+row is dumb.
Think of it this way: When your reading a book, and your on page 60 and stop, you place a bookmark in between page 60 and 61. When you open the book back up, you know which page you were on. Your not bookmarking page 60, paragraph 3, 1st sentence, 3rd word. If you quit mid-way on page 60, you skim over what you already read, and say, "ok, here is where I left off".
If you took a vote, it would be at least 1,000 to 1, that people want to bookmark the entire line and have it highlighted.
The fact that it's 3 years later and this isn't solved, is extremely pathetic.
Would be great to have. Seems it's standard for most other editors.
It appears that this has been added and merged in #104 (superseding #67).
Ok, here is the bad news: The latest release of bookmarks
, 0.46.0, still in use in Atom, dates back to Jan 2019. PR #104 got merged in May 2019. bookmarks
needs a new release and an update within Atom.
Currently the "bookmarked" CSS class is added to the line number element in the gutter, but it would be very helpful for customizing styles if the class was also added to the code line elements.
You could then change, for example, the background color of bookmarked lines with
in your
styles.less
file.