How to change the font of side bar in Sublime Text 3? - sublimetext3

I am using Ayu Mirage theme with Solarized dark color scheme for Sublime Text 3. I have the following settings added. But the side bar font is not changing.
"ui_big_tabs": false,
"ui_fix_tab_labels": true,
"ui_font_default": false,
"ui_font_roboto_mono": false,
"ui_font_size_small": true,
"ui_font_source_code_pro": true,
"ui_native_titlebar": true,
"ui_separator": true,
"ui_wide_scrollbars": false,
I have source code pro and roboto mono fonts installed. I am using macOS Mojave. How to set a monospace font for the sidebar. Is it possible to set Monaco?

Open Sublime Text and and go to Preferences -> Browse Packages.... From there, open User folder and create file called same as your theme, ayu-mirage.sublime-theme .
To modify sidebar labels, write in file:
[
{
"class": "sidebar_label",
"color": [255,255,255],
"font.face": "Monaco"
}
]
Using JSON, you can modify sidebar labels with Font properties and Shadow properties.

Related

sublime text: How do I know what font (or font string) to use when configuring font_face setting?

The question applies to both windows and Macs. But I'm on an iMac at the moment so I can only test on a Mac.
I installed the mononoki Nerd Font.
In Font Book/Microsoft Word/Textedit (which is like a macOS Wordpad equivalent), the font is called “mononoki Nerd Font Mono”.
As a test, I tried setting my font_face to these and it's not working:
- "font_face": "mononoki Nerd Font Mono"
- "font_face": "mononoki Nerd Font Mono Regular"
and no change on my display. The text looks the same with and without the line above.
Thanks.
in Windows you can open fonts settings and search for your font, and there are two things:
Font Family
Font Face
eg. I want a font called fira code retina, which is in fira code font-family so I'll search for it in fonts settings:
Now the font-faces which comes under this family will be listed below:
Then you can select the font family name and get all the details of it.
You can use Settings in Sublime Text like so:
Then, change the user settings like so with font_face property:
Save the preferences and see if that changes your font. In the above example, I have chosen American Typewriter as the font_face and the effect is noticed upon save.
Give that a shot.

Remove text highlighted rounded corner in Sublime text

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.

Change VS Code Command Palette highlight color [duplicate]

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.

Enable mouse wheel to change tabs in Sublime Text 3

I'm trying to enable tab switching using the mouse wheel in Sublime Text 3.
I added this configurations to my User settings:
"enable_tab_scrolling": false,
"mouse_wheel_switches_tabs": true,
Also tried different order and values but none is working.
I always restart Sublime after changing my settings.
Anyone got this working?
"mouse_wheel_switches_tabs": true, only works if the following conditions have been met:
the mouse pointer is over the tab bar while using the scroll wheel
your theme supports it in conjunction with your preferences
try with the Default theme
tweak your theme to support it
The Default theme contains the following rule to enable this functionality:
{
"class": "tabset_control",
"settings": ["mouse_wheel_switches_tabs", "!enable_tab_scrolling"],
"mouse_wheel_switch": true
},
Note that it doesn't work with "enable_tab_scrolling": true, so you did the right thing to set it to false.
You could add this rule to whichever theme you are using by creating a file with the same name as the .sublime-theme you are using, and pasting in the rule surrounded by square brackets - it needs to be a valid JSON array.
More information on how themes work can be found in the official docs.
You haven’t registered Sunblime. It’s the Unregistered popup that is staying in the background messing with your scroll. Look for it and close it and the scroll will work again.

Change highlight colour in Sublime Text 3?

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"
},
}

Resources