I´m trying to modify Sublime to highlight modified sidebar labels.
I used this piece of code and it`s variations, like "sidebar_tree", sidebar_tree_row etc., but it doesn´t work.
{
"class" : "sidebar_label",
"settings": ["highlight_modified_sidebar_label_row"],
"parents" : [{"class": "sidebar_label_control", "attributes": ["dirty"]}],
"fg" : [245, 100, 90]
}
Using Soda Dark theme, and already have enabled highlight modified tabs, but since I have opened 20 scripts, tabs are all pressed together.
So I figured to highlight sidebar labels, but code won´t cooperate.
Related
I recently changed my color theme in VisualStudio Code, I like everything from the theme except for the light purple color of the <> tags, they clash with the pink. How can I change them so they're a different color, preferable just a darker purple. Btw the theme im using is called Tokyo Night Storm.
Here's an image showing how the angle brackets are currently colored:
I tried going into my settings.json couldn't find exactly what to write.
Use the Developer: Inspect Editor Tokens and Scopes action to open the Scope Inspector. Then click on the token you want to inspect. Then find out its textmate scopes. In this case, the opening angle bracket is:
punctuation.definition.tag.begin.html
meta.tag.structure.html.start.html
text.html.derivative
Pick an appropriate textmate scope, and then use it in a token colour customization like so:
"editor.tokenColorCustomizations": {
"[Tokyo Night Storm]": {
"textMateRules": [{
"scope":"punctuation.definition.tag.begin.html",
"settings": {
"foreground": "#FF0000",
"fontStyle": "bold"
}
},{
"scope":"punctuation.definition.tag.end.html",
"settings": {
"foreground": "#FF0000",
"fontStyle": "bold"
}
}],
}
},
See also the docs for creating your own colour theme.
I'm creating a VScode theme and I have a long json file like this:
{
"name": "mytheme",
"type": "dark",
"colors": {
//////////////////////////////
// CONTRAST COLOR
// The contrast colors are typically only set for high contrast themes.
// If set, they add an additional border around items across the UI to increase the contrast.
//////////////////////////////
// An extra border around active elements to separate them from others for greater contrast.
// "contrastActiveBorder": "#FFFFFF00",
// An extra border around elements to separate them from others for greater contrast.
// "contrastBorder": "#FFFFFF00",
//////////////////////////////
// BASE COLORS
//////////////////////////////
// Overall border color for focused elements. This color is only used if not overridden by a component.
"focusBorder": "#aa6DFF66",
// Overall foreground color. This color is only used if not overridden by a component.
"foreground": "#aaE0E8",
// Shadow color of widgets such as Find/Replace inside the editor.
"widget.shadow": "#112330",
// Background color of text selections in the workbench (for input fields or text areas, does not apply to selections within the editor and the terminal).
"selection.background": "#9B6DFF99",
// Foreground color for description text providing additional information, for example for a label.
"descriptionForeground": "#808182",
// Overall foreground color for error messages (this color is only used if not overridden by a component).
"errorForeground": "#9B6DFF",
// The default color for icons in the workbench.
"icon.foreground": "#D9E0E8",
...
I want to try it so I follow this official article. It says to press f5 to open Extension Development Host window.
If I press f5, I get this popup
You don't have an extension for debugging 'JSON with Comments'. Should we find a 'JSON with Comments' extension in the Marketplace?
If I press find or cancel, I can't open the Extension Development Host window.
I try pressing f5 on when I had open the package.json file (that has no comments) but it's the same.
How can I debug a json file with comments.
Remove comments is not an option, it's a very long file, comments make it readable and understandable.
Solved creating this launch.json file inside .vscode folder:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Extension",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
},
]
}
What changes are needed to modify tag matching in Sublime 3, Build 3143, from an underline to background color. Much of the documentation I have been able to find online seems either out of date or incomplete. Below is an example of the desired effect.
Core Sublime only matches brackets and tags with a dotted underline, and as far as I'm aware it's not possible to visually modify the style in the general case.
To get around that, you can use the BracketHighlighter package to do what you want. Once you've installed it, you will need to configure it to your liking, for which you should check out the documentation.
Briefly, in order to get it to do something like what you've outlined above, you want to select Preferences > Package Settings > BracketHighlighter > Bracket Settings from the menu (Preferences is under Sublime Text if you're on MacOS) and then add the following to the default settings:
"user_bracket_styles": {
"tag": {
"icon": "tag",
"color": "region.purplish",
"style": "solid"
},
}
Note that region.purplish as a potential scope name was added in Sublime build 3148, so for build 3143 you will need to select a scope name that is colored the way that you want in whatever color scheme you're using. For example, if you're using the Monokai color scheme, the scope constant.language looks purple.
When we open multiple files in SublimeText2, the tab of the currently displayed file is a bit darker/lighter than the rest. My problem is, I cannot see it — the shade difference is too small.
What is the name of the key in the .tmTheme file, so I could make it more contrasting? Or is it just a hard-coded effect that I can't influence?
Tab colors are set by images in the .sublime-theme. The class/attribute you are concerned with is
{
"class": "tab_control",
"attributes": ["selected"],
"layer0.texture": "//IMAGE TO USE AS BACKGROUND FOR TAB//",
"layer1.opacity": 0.0
}
But any of the "class": "tab_control" properties can be customized.
I have been working on a small Chrome extension with a problem: I can't seem to get my head around and would appreciate someone to look at it with a fresh perspective.
The goal is to create a Chrome extension which enables you to select text on any given website and display an option to send the selection to another website for search using a contextmenu item.
My manifest.json (v2) looks like this:
{
"name": "simple ext",
"version": "0.0.1.0",
"description": "this is a test",
"background": {
"scripts": ["js/test.js"]
},
"default_locale": "en",
"manifest_version": 2
}
messages.json:
{
"contextMenuTitle": {
"message": "Search for '$searchStr$'"
"placeholders":{
"searchStr": {
"content": "$1"
}
}
}
}
And js/test.js:
chrome.contextMenus.create({
"title": chrome.i18n.getMessage("contextMenuTitle", "%s"),
"contexts": ["selection"],
"onclick" : function(e){
if(e.selectionText){
var searchURL = getSearchURL(e.selectionText);
chrome.tabs.create({"url": searchURL});
}
}});
The problem I have is when I select text like "science & technology" the context menu shows the text "Search for 'science technology'" but in the onclick event, I get the correct text (that is 'science & technology'). So my searches work properly. The problem is with the text being shown as the title in the context menu.
I had a look at this and you might want to report a bug at http://crbug.com/ if one doesn't exist allready (had a 'quick' look and couldn't find anything). This 'bug' seems to apply to both the localization and context menu title. Neither will display an ampersand if you only use one, to get one to show for either it seems you have to use two && and then it will show as & (in your bug report, mention that this isnt explained in the docs either). But as you cant change the contents of %s before its shown I don't know how your going to deal with that....Unless you didn't use the %s and updated the title yourself every time they selected something on the page.
Perhaps its being rendered as html?
Try "Science & Technology"