When I place my cursor on the extremity of a block (represented by the white drawn cursor on the picture below) VSC highlight both the ending and the starting symbol of that block.
The red line on the picture represent the starting and the ending of that block. Where can I set the option for VSC to automatically use a background color to highlight the current selected block ? (I am really more of a visual guy and I like to feel where's my current locations when I am coding.)
You are going to need an extension to do that, it isn't built-in. Try:
Indented Block Highlighting
I am not sure it supports all languages but see if it works in your case.
Bracket-pair-colorizer does something similar but more subtle. See "bracket-pair-colorizer-2.showHorizontalScopeLine".
.
And see How to change indent guide line color between brackets in VSCODE? - perhaps highlighting the active indent guide will be enough for you?
Using (in your settings.json):
"workbench.colorCustomizations": {
"editorIndentGuide.background": "#bbb",
"editorIndentGuide.activeBackground": "#f00e0e",\
}
Related
I've recently noticed that when typing out long lines of code, they split into multiple lines after this threshold and it bothers me. enter image description here
Not sure if it was a formatting extension that I put on here years ago, but I couldn't seem to locate it in the settings.
The grey line isn't what causes the wrapping. You can apply settings to have the grey line and not have wrapping. They grey line is displayed according to the editor.ruler setting.
In general text editor terminology, this wrapping you are observing is called "soft wrapping" (when an editor wraps long lines in its rendering of the text, but doesn't actually insert line-break characters, which is called "hard wrapping").
By default, soft-wrapping can be toggled by Alt+z (The command palette command is named View: Toggle Word Wrap).
The default setting of soft wrapping for VS Code is configurable by the editor.wordWrap setting. It has several values it can take on:
"bounded": lines wrap at the minimum of viewport width and editor.wordWrapColumn,
"off": Lines will never wrap
"on": Lines will wrap at the viewport width
"wordWrapColumn": Lines will wrap at editor.wordWrapColumn
The word wrap column is configurable by the editor.wordWrapColumn setting. See also the editor.wrappingIndent and wrappingStrategy settings.
This is a setting called rulers. Go into Settings and search "rulers". Then you will be able to edit the settings.json file. Under "editor.rulers" remove all values in the array so that it is empty. That should solve it.
I want VSCode line highlight to look like this
Currently, it looks like this
Basically I dont want VSCode to highlight the entire line.
Look at the options for this setting:
Editor: Render Line Highlight
options are none, gutter, line and all
You cannot just highlight the text part of the line. If that is what you want, look at the gutter option perhaps. If you just want to reduce the obviousness of the highlight, use #rioV8's answer - the last two digits in the hex are opacity.
add this to your settings.json (global or project)
"workbench.colorCustomizations": {
"editor.lineHighlightBackground": "#00000000"
},
Set the line highlight to a transparent color
In the image below I'm actually in "rename" and I'm highlighting something but there's no highlight. You'll notice there's no cursor as well because it's highlighting. This is driving me a bit bonkers because I'm either counting how many left/right arrow keys I'm moving and such to know where I am. I tried the following colors but none of these seem to do anything (in the Explorer):
"workbench.colorCustomizations": {
"editorRuler.foreground": "#fc199a22",
"editor.selectionBackground": "#ab3beb3f",
"editor.selectionHighlightBackground": "#136460e3",
"editor.findMatchBackground": "#00cc44a8",
"editor.findMatchHighlightBackground": "#d0ff004d",
"scrollbarSlider.background": "#FC199A2c"
},
I tried inspecting the element in the developer console in VS Code but the rename closes when it blurs out of the field which I need to do to select the element to know what the CSS class is to style it.
I didn't see a "rename" or highlight color for the explorer here either: https://code.visualstudio.com/api/references/theme-color#editor-colors
Any help would be super appreciated.
You can use the following property:
"selection.background" : "#FF0"
The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.
A caveat to this approach is that it is applied globally, not just the explorer view
I'm using prelude emacs with solarized theme and parenthesis highlights are hardly visible and looking very ugly. I've tried disabling show-smartparen-mode also show-paren-mode but nothing seems to disable it. I'm not sure, which mode is making highlight parenthesis. Please check the image below:
I would like to change background color of parenthesis to something else so it is more visible. I would appreciate if anyone could provide any help/comments in this regards. Thanks!
EDIT
Problem: The matching parenthesis highlight, if you look at image above, my cursor is immediate right of the ) therefore ( and ) are highlighted in bluish shade which is not visible.
What I want: I would somehow like to change background color of this highlight.
After doing C-u C-x = with the cursor on the highlighted parenthesis, you will know what the highlighting face is. If you just want to change its background color, then do M-x customize-face FACE, where FACE is the face name.
Is there an emacs plugin which creates these nice vertical lines for the code blocks like in Sublime Text 2? (See attached screenshots for what I mean).
Please see highlight-indentation:
https://github.com/antonj/Highlight-Indentation-for-Emacs/
Unfortunately the current version is very simple and it draws character-wide columns instead of thin lines so it doesn't look very appealing. But at least it's a start.
I do not use it by default - if I'm lost then I do M-x highlight-indentation.
It's not quite the same thing, but you get a similar benefit from the features mentioned here:
http://www.emacswiki.org/emacs/HighlightCurrentColumn
http://www.emacswiki.org/emacs/VlineMode
Vline can use a thin line (or a face). Column-marker highlighting stays put (doesn't move with the cursor), and you can highlight any number of columns, but it uses a face, not a thin line.