How to have the Sublime Text console showing color instead of the color codes - sublimetext2

I have a build system output in the console. However it is showing color code instead of the actual colorized text.
[37;46;1mTest file: static/tests/casperjs/login/test.js
How can I apply a color theme to the console output?
Thanks!

Unfortunately sublime doesn't support this. I ended up writing a plugin that parses the output and converts it into a colored version (for a subset of colors, ones we use in our testing framework).
If you would like to look into that, or if anyone stumbles upon this in future here are some tips..
I detect output in the plugin with an on_modified event listener and a view
with no name (view.name()). This does not uniquely identify the output pane
so you'll have to do a bit more than that, I found no other easy way (unless
you want to hook into your build plugin and act directly on the view it generates).
To make the color changes, I remove the color codes (view.erase()) and add color to the
regions marked by those codes with view.add_regions(). The colors I add are
ones I manually insert into a custom theme, as again there seems to be no
other way. Also, for some reason it seems you can't add a color with the
exact background of the active theme (it inverts it or something), so I set
the color's backgrounds to something just different.
As you can tell, it's a hacky, ad hoc solution, otherwise I would release it on Github.
You can also check out SublimeREPL, it does console text coloring

Related

Graphical changes after gtk_widget_set_sensitive()

I need to know what (graphically) happens to a button which is assigned to the "disabled" status with a gtk_widget_set_sensitive() function.
I am not the programmer but am documenting the behavior of a tool, built with Gtk+, which buttons are eventually disabled by the programmer by issuing that gtk_widget_set_sensitive() function (I am told). For my documentation, I need to emulate the visual result on the original icon once deactivated but I have no clue on what happens to it. It becomes brighter, blurry? desaturated? other?
Where can I find sources / hints on that?
what follow are caps of the two different (visual) statuses of such a button.
Enabled
Disabled
This is the the documentation from Gtk 1.
Insensitive widgets are “grayed out” and the user can’t interact with them. Insensitive widgets are known as “inactive”, “disabled”, or “ghosted” in some other toolkits.
How does disabled widget look like depends on the theme being used. You can install custom themes in Gnome desktop. I have two screenshot taken with "adwaita" and "adwaita-dark" theme.
Themes can be defined with CSS file. This is repo for adwaita theme. https://github.com/GNOME/gtk/tree/master/gtk/theme/Adwaita. You can search button, insensitive and disabled to find out what colors are being used.
To find the exact color used, you can find it
https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-set-sensitive

how to fast convert bootstrap button into png image file?

that I would like to say, there is a good (or maybe not) bootstrap framework that can generate buttons with simple code.
I really like how these buttons look, and I want to use them in another software, but for this I need them in PNG format.
Why is not satisfied with the option "manually" - the buttons need a lot and not always needed, but when needed - they need fast, do not really want to spend a lot of time creating buttons ...
Current process:
Open page (for example https://www.tutorialrepublic.com/twitter-bootstrap-button-generator.hhp) to set the necessary parameters (button name, size, type, color, icon ...)
Copy the whole screen to the buffer
Insert a screenshot from the buffer into an image editor
Make necessary cropping of this picture, leave only the image of the button itself
Save the result in png format
Use the image in your application.
That I would like to receive:
Open (no difference - internet page, any software, etc...)
Specify the required parameters (button text, size, color, icon)
Press the button - save to PNG, without loss of quality.
Use the image in your application
Maybe someone already solved a similar problem and translated it into a semi-automatic mode, share the implementation.
I use Win10 at workstation
The easiest way would be to manually crop them by Snipping Tool. This works great if you have just a few buttons.
But if you want to take them automatically, I think you can use an python/opencv script to idendify buttons, crop and save them.
Ok, solution found - ShareX (https://getsharex.com/) software with 1 hotkey (ctrl + printscreen) - open crop dialog with zoom, after crop - makes the png-file automatic

windowbuilder how to highlight a text entry

in windowbuilder i have a textentry field.
in case the entry is invalid i display the message and want to highlight that it is selected.
the following code works that it does all, but highlighting:
txtSoftwareId.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));
txtSoftwareId.setText(errorMsg);
txtSoftwareId.selectAll();
txtSoftwareId.setFocus();
txtSoftwareId.showSelection();
if i start typing it will delete the entry as it should. only thing is i would like to highlight.
i tried the background color, but that would change the textfield background but not the text background.
Any ideas how to do that?
I also run into this once, it's a known bug on Windows and 3.X Eclipse platform. Has a workaround, see here.

How to add new theme in PhpStorm 10.0.1

Note: Answers from this question did not work for me.
I am new to PhpStorm, and I'm currently using the version 10.0.1.
I'm trying to add a new theme Dark Peacock because it best suits my preference. I did my research and already tried placing the files in these folders:
C:/Users/USERNAME/.PhpStorm2016.1/colors
C:/Users/USERNAME/.PhpStorm10.0.1/colors
C:/Users/USERNAME/.PhpStorm 10.0.1/colors
C:/Users/USERNAME/.WebIde100/config/colors
C:/Users/USERNAME/~/.PhpStorm10.0.1/colors
C:/Users/USERNAME/~/.PhpStorm 10.0.1/colors
... but nothing seems to work for me. The new theme just doesn't show up in File->Settings->->Appearance & Behavior->Appearance->Theme Dropdown.
Any other idea out there?
It seems that I have confused "theme" with "color scheme".
The theme is the one that changes the general look of the application, that is, the background color of borders, sidebars, menus, and maybe more (of which I haven't discovered yet). This was not really what I wanted to change.
The color scheme is the one that changes the text editor's background and text colors. And this is what I was trying to change.
Color schemes do not show up in
File->Settings->->Appearance & Behavior->Appearance->Theme Dropdown
because they are in
File->Settings->->Editor->Colors & Fonts->Scheme Dropdown
NOTE: The exact location for Dark Peacock.icls that made this work is:
C:/Users/USERNAME/.WebIde100/config/colors
The colors folder does not exist, so I had to create it.

How to display inline errors in the editor

On the scrollbar, the yellow areas designate warnings in the code. When hovering them, we get a nice preview of the code along with message labels at the end of the line, as seen in the screenshot below:
I find this really nice and would like to display them all the time directly in the code editor. I looked up a bit and didn't find any option for that. Is it possible? If yes, how?
Right now it is not possible: https://youtrack.jetbrains.com/issue/IDEA-139324 -- watch this ticket (star/vote/comment) to get notified with any progress.
It works like that only in Code Lense mode which allows you to preview small chunk of another part of your file together with errors/warnings/etc.
But if you want to see a list of all errors for this file/folder/whole project -- use Code | Inspect Code....