Sublime Forum

Dev Build 2156

#14

I like this new theme – though I would like to see the sidebar do the same thing as the top tabs (change colors with themes). That would be really cool!

0 Likes

#15

Agreed. That’s my only complaint. The bright sidebar does not match dark themes and is distracting.

0 Likes

#16

Would you be willing to consider making this configurable? I’m thinking of a situation such that I write a plugin or script for my own use that might take a while. It would be nice to have a setting or two that allow users to disable the feature entirely or crank the time up enough to get the tasks done. Maybe something set to 0 disables and anything above 0 is interpreted as milliseconds. In this way, the user would have to know to do this so should understand and take responsibility for longer running tasks.

0 Likes

#17

sroebuck: if it’s not working for you, these steps will fix it: sublimetext.com/docs/2/revert.html

les: it sounds like you’re looking at a cached version of the page, reloading should help

phillip: highlight_modified_tabs isn’t currently supported. With regards to the API changes, you’ll see each warning only once per session, so it shouldn’t be too distracting, but you can disable them altogether via the hidden detect_slow_plugins global setting.

0 Likes

#18

Any plugins running longer than the mandated times should most likely be done in a background thread.

0 Likes

#19

Love the new UI very clean and professional

0 Likes

#20

[quote=“jps”]Dev Build 2156 is out now.

2156 features a new UI theme. One of the unique aspects of this theme is the way the tabs adapt to the current file’s color scheme. It’s been in the works for a long time, but I hope you’ll agree it’s worth the wait.

Also worth noting is the sublime.log_input(flag) function. By entering sublime.log_input(True) in the console, every key press will be logged to the console, helping you work out the name of the key to use in a key binding.

For API developers, there’s now a requirement that all event handlers complete in a short amount of time (16ms for frequent events such as on_modified and on_selection_modified, 200ms for other events). It’s been a long standing issue that a user can unknowingly install a plugin that makes the editor sluggish on large files, but the cause hasn’t been immediately evident to the user.[/quote]

FWIW, in my case at least… this feature doesn’t work at all. I saw the pop-up once, in flagging my plugin when it theoretically wasn’t running.
By that I mean, there were no .go files loaded so I shouldn’t ever see a source.go scope and there not run. In fact, it didn’t come from my plugin doing anything, it was simply checking the scope and possibly due to the heavy disk usage at the time the ST2 api was slow to respond.

I confirmed it doesn’t detect my slow plugin because the slow operation was run via a sublime.set_timeout so if I sleep a couple seconds, the ui is a little unresponsive as expected but nothing is detected(expectedly).

In the mean-time I moved that stuff off into its own thread even though I was a little reluctant to do so still, because I don’t want to introduce any instability into the editor(which is why it was run from a sublime.set_timeout).

I don’t know if anything has changed recently but IIRC when I just started writing the plugin a few months ago, I was told that there was no way to denote that a plugin should run only in a certain scopes(like we can do with key bindings) so I had to check the scope myself, meaning it’s always running.

I think what would be cool is if we could have something akin to set_timeout(or set_timeout itself) where we could schedule some function to run and the editor would run it such that it doesn’t make the ui unresponsive, that way we don’t have to mess with threads and the nightmare that they come with.

I will file a couple reports of how ST2 freezes the ui in its own operations.

0 Likes

#21

DisposaBoy: Checking a scope shouldn’t trigger the timeout: the HTML completion plugins, which are shipped with the editor, do this from their on_modified event handler, and I haven’t yet seen reports of this resulting in warnings. Plugins are allow to exceed the limit once before a warning is issued, to account for any initialisation issues. That being said, it’s certainly plausible that there will be times, such as when the entire application has been swapped out to disk, that plugins will unfairly receive warnings.

set_timeout callbacks are run in the main thread, and warnings currently aren’t issued if any of these callbacks take too long, although this will change in the future if required. There is unfortunately no way to have set_timeout both run its callbacks in the main thread, and not have them potentially cause the UI to be unresponsive.

There are certainly times when Sublime Text itself will block the UI thread, such as when saving, but in general there aren’t many of these situations, and none in response to the critical on_modified and on_selection_modified events.

As a general rule, no warnings are issued if a command takes too long in it’s run() method, and none will be in the future. Any commands explicitly issued by the user are allowed to take a long time, as this is often intrinsically unavoidable (e.g., sorting the lines in a 1GB file).

0 Likes

#22

Did you mean on_query_completions ?

0 Likes

#23

Yep!

0 Likes

#24

Thanks heaps for the update Jon.

Massive improvement in look and feel over the old UI.

As a few people have mentioned the first install of the upgrade broke my Mac installation of ST2 but I suspect that was due to nasty changes I had made to default files in my first days with ST2 when I was making changes in the default setting files that should have been in my user setting files.

Blew all my user setting files away, reinstalled B2156 and set up my user settings in the user files where they should always have been and all is working great.

The sidebar is still an issue but a much reduced one. The muted grey you are giving me now is acceptable where the old blue one was just not acceptable at all to me. Had I not been able to work out how to change it I would have had to abandon ST2. I could live with the new default one well enough (but I will still change it because it is too much fun to play with ST2 to miss the chance)

For the few who are not happy with the new sidebar colouring then just go to this file:

Packages/User/Default.sublime-theme

(If there is no such file then copy one in from the location below.)
And look for code like this:

[code] {
“class”: “sidebar_tree”,
“row_padding”: [8, 3],
“indent”: 12,
“indent_offset”: 17,
“indent_top_level”: false,
“layer0.tint”: [0, 0, 0],
“layer0.opacity”: 1.0,
“dark_content”: false
},
{
“class”: “sidebar_heading”,
“color”: [255, 102, 0],
“font.bold”: true,
“shadow_color”: [0, 0, 0],
“shadow_offset”: [0, 0]
},
{
“class”: “sidebar_heading”,
“parents”:

        { "class": "tree_row", "attributes": "selected"] }
    ],
    "shadow_color": [0, 0, 0]
},
{
    "class": "sidebar_label",
    "color": [255, 102, 0],
	"shadow_color": [0, 0, 0],
    "shadow_offset": [0, 0]
},[/code]

If you use the settings I have above you’ll see what I am running (you may well hate it but it is my screen and my eyes) and if you look at this file:

Packages/Theme - Default/Default.sublime-theme

you can see what the defaults are.

Play with these settings in your ‘User’ version of the file and you can have the sidebar as you want it.

This is the stuff that makes ST2 my favourite editor.

Anyway, huge huge kudos to Jon for a impressive step forward in the UI design. A really nice gift to start my new year with an even better text editor than I already had in the great ST2.

Onwards and upwards.

0 Likes

#25

btw, the work for the new theme was done by Mike Rundle (had to check with him before posting, which is why this is missing from the original post).

If you’re going to customise the theme, rather than copying it wholesale, then best option is to define just the rules you need in your User/Default.sublime-theme file, for example:


    {
        "class": "sidebar_tree",
        "layer0.tint": [20, 20, 20],
        "dark_content": true
    }
]

It works in a way similar to CSS, where all the files named Default.sublime-theme will be applied in turn. By doing this, you’ll ensure you minimse the trouble you run into when upgrading.

0 Likes

#26

[quote=“jps”]btw, the work for the new theme was done by Mike Rundle (had to check with him before posting, which is why this is missing from the original post).

If you’re going to customise the theme, rather than copying it wholesale, then best option is to define just the rules you need in your User/Default.sublime-theme file, for example:


    {
        "class": "sidebar_tree",
        "layer0.tint": [20, 20, 20],
        "dark_content": true
    }
]

It works in a way similar to CSS, where all the files named Default.sublime-theme will be applied in turn. By doing this, you’ll ensure you minimse the trouble you run into when upgrading.[/quote]

This doesn’t work on 2156 OSX. Try creating Packages/User/Default.sublime-theme with that exact content and then restart the editor. This is what I get:


0 Likes

#27

quarnster: The only way I can reproduce that is to delete the file or contents of Packages/Default/Default.sublime-theme. Please check your console to see if there are any syntax errors in the file, which will have a similar result.

0 Likes

#28

Yep, it was a user error. I think I managed to move Default.sublime-theme into my User folder rather than copying it. Thanks :smile:

0 Likes

#29

While I can appreciate the effort I find the new loo very hard to look at. I use a dark theme and much prefer the darker sidebar. Please at least make this configurable.

The tabs are also extremely hard to look at with a dark theme. I feel like everything was great before and now it’s gotten much worse (for me at least). I’m begging,
please make this stuff configurable. I mean I can’t really switch editors but this is so awful it makes me want to.

edit: I also dislike the change to the command+T menu’s. There is a lot less contrast now and is harder on the eyes (again at least for me).

0 Likes

#30

@mattstopa Please read @jps’s above post about configuring the theme. You may also like the Soda theme. It’s available to download here: https://github.com/buymeasoda/soda-theme. Some screenshots are included on the github page.

0 Likes

#31

@C0D312 The soda theme is okay but I’ve been using Cobol and want to stick with it. The biggest issue is the tabs for me. I can’t tell what is selected. It would be nice if there was an option for a classic mode. Having to configure things manually isn’t the most fun, it makes getting up and running on a new computer take that much longer.

0 Likes

#32

hmm, are you confusing theme with colorscheme? Soda is a theme which changes the UI while colorschemes change the background and text color. Themes and colorschemes are independent of one another.

0 Likes

#33

Sorry everyone for being confusing.
What jps said is what I was trying to say, but I didn’t.
Doing what I sounded like I was saying was what broke things for me in the past and then I write something that reads as though I am suggesting exactly that bad behaviour to others. I am a dill, sorry.

Seriously???

  1. Spending a bit of time getting your coding environment just as you like it is not something you enjoy? We are from different planets.

  2. All you need to do to achieve stuff like a dark side panel is to save a tiny text file into your Packages/User folder. Save a copy in your Dropbox folder (you do use Dropbox don’t you? If not then make it the next thing you do. If you refuse the Dropbox option then save the relevant files onto a USB drive.). The first thing you do on every new machine is set up Dropbox. Then the first time you want to use ST2 you copy a tiny file into your User folder and all the settings are there.

Do the same thing with your User Settings files and colour syntax theme (if and only if it is a non-standard one) for 3 file copies all your preferred settings that are different to the defaults (about 20 for me) are exactly as I like them.

Contrast that to going through 20 menu hunting and option clicking processes to get things set up on some Editors.

I really think you are getting this all backwards in your mind.

0 Likes