-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Ability to edit style as-is as it was downloaded in a single editor window #178
Comments
Single editor is planned, but it's a complex feature so I can't say any ETA. Ctrl-F works globally in Stylus: simply press F3 or whatever hotkey you use to repeat the search and it'll jump into the next matching section. There are also hotkeys to switch sections, Alt-PageDown and Alt-PageUp, you can press |
Huh, that's actually true, but this search feature:
So, all in all I'd like to be able to disable this search feature and use one provided by the browser. It works much better for me. |
These are my observation over the couple of years I've been using this search feature in Stylish-for-Chrome and Stylus:
|
Oh, there's the link! I'll investigate the delay and highlighting then. |
Strange, that's not how it works for me. I've tried to look for "wrapp_content" string which is located closer to the end of stylesheet and browser's search feature had no problem to locate it. And yes, it generates all DOM entries with small delays between them in my case. It takes some time and doesn't make it unresponsive. |
BTW I have an old initial draft of the single editor mode for Stylus, buggy but fast with your style: zip. |
It does work that way but only for code within a really big section. Like 1MB big. All your sections seem to be very small and fit within the rendered part. My explanation was bad, obviously. Maybe "rendered" was ambiguous? It means rendered by CodeMirror into DOM, it doesn't mean the visible part of the browser window. |
I've fixed the delay. As for scrollbar highlighting, I guess you meant the overall window scrollbar, which we don't modify, indeed. Only each section's scrollbar, if shown, is highlighted. In the future the single editor window will highlight the overall scrollbar of course. |
Nice and works really fast. As I understand this version still works with code already processed by import procedure, though, since formatting is off and part of the comments are removed.
Oh, right, you are using CodeMirror to draw sections of code and not entire page. Was a bit confusing. Ok. |
Yes, that's how that old draft works. |
@lainverse, as for the browser "find" command, you can invoke it via keyboard without opening the browser menu: focus the address bar with Ctrl-E, then Ctrl-F. |
Hm... Didn't though about this. Thanks, that's a neat idea and both keys are next to each other. |
@lainverse, you can add a usercss header comment to your style, switch "Write new style as usercss" in Stylus options, click "Write new style", paste the header comment, paste the original style, save, and now it'll always open in the fast single editor mode. Currently this new version of Stylus is only pushed to Firefox AMO, though. |
Works for a new style. However, doesn't work with mine. What am I doing wrong? |
I don't know what you're doing :-) |
I mean look at my style. Here is the header:
Is something wrong here? |
Trying to save the style with this header displays an error about invalid version. Use |
The entire point of the instruction above is to make a new copy of the style in single editor mode. Not sure I can explain it better :-( |
That saved fine in mine, as a test. |
Since when zero is invalid version number? O_o
I've tried to save a new style with it and it works fine. However, when I've tried to remove and re-install my style it had no effect. And honestly what is the point if it won't work with installed styles? |
usercss is a special format and it uses strict rules, the single editor also looks different. |
I want to make it work with my existing style: |
@lainverse the |
The instruction is only for you as an author to be able to edit the style in a single editor right now. We don't have a single editor mode for normal styles. Only for usercss. The instruction I posted specifically says you'll create a new style. I'm bad at explaining obviously. |
@tophf Oh, thought it will parse style on install and that was just an example how to generate a style with a proper header. Sorry. Hope you'll implement this mode for installed styles as well later. @mechalynx To be honest semver doesn't even apply to styles since there are no API to begin with and 'patch' is rather foreign concept when you try to apply it to a style which spans hundreds of domains with separate set of rules for each. Ok, I've modified style for one domain - this is a patch, then I added new domain... minor version? patch? One domain were renamed and one mirror added? UGH! |
Yeah, use any increment you like. |
To reiterate, the solution is to use usercss. |
I'm a maintainer of this ridiculously large style:
https://userstyles.org/styles/101141/ru-adlist-css-fixes
The problem I've encountered when migrated from Fx to Chrome a few years ago was the fact that I can't properly edit my style using Stylish. It was fine with Stylish version for Fx since there were single window with all the code. I can't even use Export feature to quickly copy-paste my style to userstyles.org since it breaks all my formatting and removes comments.
Besides that one of the biggest annoyance with the style editor is the fact that I can't use search feature (Ctrl+F) globally and limited to currently active editor frame instead. I have to call "Find..." from the browser's menu.
The text was updated successfully, but these errors were encountered: