I don't like the rounded corner on the highlighted text in sublime text 3. How can I disable this feature from the sublime text?
The rounded corners of selected text in Sublime Text is controlled by the selection_corner_style global setting of your active color scheme. In order to change it, there are basically two ways. You can follow any one.
If you have the PackageDev package installed, then you can choose PackageDev: Edit Current Color Scheme from the command palette. This will open a split window layout with the default color scheme on your right group & your User version on the left group. Add selection_corner_style: "square" to the existing global values and save the file. This will get rid of the rounded corners and give it sharp corners instead.
The second (and the laborious way if you don't want to install a package) is to follow these steps :-
Find out your active color scheme name from the color_scheme setting from your User preferences (go to Preferences: Settings from the command palette).
Create a file by that exact same name in the User directory (Preferences -> Browse Packages ... from the main menu).
Paste the following
{
"variables": {
// Define variables here
},
"globals": {
"selection_corner_style": "square",
},
"rules": [
]
}
Save the file.
Note: If you are using a custom color scheme and don't define the selection_corner_style, the default value of this key is round & it will still apply.
Related
Is it possible to change the color for quick picker selected option via settings?
To keep your current theme and change just this color, find "Workbench: Color Customizations" in your settings and click "edit in settings.json", and add the following to the user settings on the right side of the screen:
"workbench.colorCustomizations": {
"list.focusBackground": "#CCCCCC"
},
You can replace it with any color you'd like.
You can install or download a new theme via:
Files -> Preferences -> Color Theme
Or you can create your own theme from scratch or reuse of an existing one with the VSCE tool:
https://code.visualstudio.com/docs/extensions/themes-snippets-colorizers
Or you can simply find the theme in the folder::
\Microsoft VS Code\resources\app\extensions
Where the colors are saved in JSON files.
The defaults are in the:
\theme-defaults\themese
Here is the Visual Studio Light (light_defaults.json), where I just changed the list.hoverBackground color to some hideous purple:
{
"$schema": "vscode://schemas/color-theme",
"name": "Light Default Colors",
"colors": {
"editor.background": "#FFFFFF",
"editor.foreground": "#000000",
"editor.inactiveSelectionBackground": "#CCCCCC",
"editorIndentGuide.background": "#D3D3D3",
"editorIndentGuide.activeBackground": "#939393",
"editor.selectionHighlightBackground": "#FFFFE0",
"editorSuggestWidget.background": "#F3F3F3",
"activityBarBadge.background": "#007ACC",
"sideBarTitle.foreground": "#6F6F6F",
"list.hoverBackground": "#FF00FF",
"input.placeholderForeground": "#ADADAD"
}
}
--- update ---
Different themes use more or fewer options depending on how much they vary from the default color. Missing ones can be added too. The ones you are looking for here are called list.hoverBackground and list.highlightForeground and they are pretty general affecting lots of different areas in VS Code.
"list.hoverBackground": "#ffffff",
"list.highlightForeground": "#bbdaff",
You really asked two questions: hover color in the question title and selected option color in the first sentence. Those are handled in two different ways:
"workbench.colorCustomizations": {
"quickInputList.focusBackground": "#ff0000", // the selected option color
"list.hoverBackground": "#ff0000" // the hover color
}
The selected option is for when up/down arrow in the Command Palette/Quick Input and the hover is for a mouse hover.
There are 2 variables that I know of associated with Quick Picker. Neither seem related to a hover color but they may be. The 2 are:
pickerGroup.border: Quick picker (Quick Open) color for grouping borders.
pickerGroup.foreground: Quick picker (Quick Open) color for grouping labels.
Hope one of these helps you. Try them in the settings file.
I want to change the font of the search bar and also the results there, because I can't see it clearly
I saw your question still hanging so I installed Sublime on Debian to try to configure it.
First of all, you can read how to customize Sublime at here. And the part of interface you want to configure is called quick_panel, specifically class quick_panel_label.
At the end of theme configuration page, there is an example of customization file.
I don't know what theme are you using, but if you are using Default theme, you should create new file called Default.sublime-theme and place it in Packages/User/. You can quickly find that path by menu of sublime, Preferences -> Browse packages... .
Content of Default.sublime-theme should be:
[
{
"class": "quick_panel_label",
"font.size": 25
}
]
where font.size represent font size of menu you are trying to customize.
P.S.
If you don't know the name of the file your theme is using, from menu choose Preferences -> Theme... and all themes should be listed with their .sublime-theme file.
For example, I customized Arc Dark theme.
I hope this works for you.
I want to use Monokai as my default Color Scheme.
For JSON files I want to use the Monokai JSON+ Color Scheme.
Question: How do I specify which color scheme to use for a specified file type?
The color scheme used in Sublime is controlled by the color_scheme setting. If you select Preferences > Settings from the main menu, Sublime will open up a new window split down the middle vertically showing you two files.
The settings in the left hand side are the default settings that globally apply to everything in Sublime. The settings on the right hand side are your user specific settings.
Any setting you place in the right hand side overrides the default setting on the left, and any setting you don't specifically add to your custom preferences remains at the default.
For Sublime build 3143, the default value for the color_scheme is:
// Sets the colors used within the text area
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
A small handful of settings in Sublime are application specific and can only be altered from the defaults in your user settings, an example of which is the theme setting that controls the overall look of the application.
For all other settings, you can further refine the settings that you want on a syntax (file type) basis, for example to alter how wide a tab is based on the type of the file that you're editing.
color_scheme is an example of setting that can be changed in this manner, allowing you to specify a color scheme other than the default for files of a certain type.
In order to do that, you first need to open up a file of the type whose settings you would like to change (in your example, that would be a JSON file). Make sure that the bottom right of the window is telling you that the file is of type JSON before you proceed.
Next, select, Preferences > Settings - Syntax Specific from the menu. Like the above command, this opens a new window that's split vertically, but this time your custom user settings are on the left and the settings specific to JSON are on the right (the file should be named JSON.sublime-settings).
Any settings that you add to this file will be in effect for any JSON file that you have open, with the rest of the settings behaving as they do above; if it appears in your user preferences, it will be set for JSON, and if it doesn't appear in your user preferences it will be set to the defaults.
So by adding the color_scheme setting specifically to that file, you can make your JSON files have a customized color scheme.
With all of that being said, the easiest way to change the global color scheme in Sublime Text 3143 is to use the Preferences > Color Scheme menu item, which allows you to interactively select the color scheme that you want to use.
There is no such menu item for specifically changing this setting on a per file basis. So if you're unfamiliar with settings in general, your best course of action to get a custom color scheme for a certain file type (JSON in this case) would be:
Use Preferences > Color Scheme... to set the color scheme that you want to use for a particular file type (i.e. Monokai JSON + in your case)
Open up a JSON file
Select Preferences > Settings - Syntax Specific to open up the settings for JSON files
Copy the color_scheme setting from the left hand pane to the right, then save the file
Use Preferences > Color Scheme... to set the color scheme back to your global default.
As soon as you finish step #4, you should see the color scheme in your open JSON file change, letting you know that the operation has succeeded.
How can I change the default highlight colour in Sublime Text 3? I used to know how find a highlight key in one of the theme files in ST2 but things changed quite on ST3. Are they in the library somewhere? "Preference >> Browse Package" is almost empty.
You can see which theme you are using by going to
Preferences>Colour Scheme
and see which one is ticked.
Open the theme file and find the key that says:
<key>selection</key>
Go to a site that shows hex colour codes (like this one http://html-color-codes.com/) and find the code for the colour you want. Then sub your new colour code into the line below the selection key in the theme file, replacing the old hex colour code.
Save the modified theme file and it should work straight away.
EDIT
Install PackageResourceViewer plugin using package control. Open the command palette with ⌘⇧P (for windows/linux CtrlShiftP) and type prv to get the PackageResourceViewer options. Choose Open Resource >>Theme- YourTheme >> and edit your theme file
Tony Vincent's answer is excellent, and I would also add that if changing the selection color makes the selected text difficult to read, selectionForeground is the key to change. For example:
<key>selectionForeground</key>
<string>#000000</string>
With the new .sublime-color-scheme format, it's a global setting key named line_highlight
e.g.
{
"name": "My colour scheme",
"globals":
{
"background": "rgb(0, 0, 0)",
"foreground": "#aaaaaa",
"caret": "red",
"line_highlight": "#222222"
},
}
Is there the way to change the line and background colors of CMFCBaseTabCtrl?
I can change tabs color via SetTabBkColor(...) or SetAutoColors(...) but control's header and lines remain grey.
SetSysColors(...) is not an option because it changes colors globally for entire OS.
Basically we need to apply some lite/dark color scheme. I can not find the way to change tab control background and line colors. When the tab background color is set by SetTabBkColor(...) it leaves the space near the tab border.
Also its expected that SetActiveTabColor(...) will change the background of the active tab but it does pretty nothing.
And there is no way to change the text color of the active tab. I belive this stuff is customisable but can not find how.
The colors are retrieved from the current instance of the CMFCVisualManager.
CMFCVisualManager::GetTabFrameColors is used. And some other manager functions like OnEraseTabsFrame and OnEraseTabsArea.
So derive your own visual manager from the one you prefer. Overwrite the specific functions and so you can change the colors and behavior.
There is no other way. Just lok into the source code in void CMFCTabCtrl::OnDraw(CDC* pDC)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\src\mfc\afxtabctrl.cpp