How do I remove solid colour background behind text in vscode terminal - visual-studio-code

I want to remove the solid colour background behind all the folder names in vscode. This picture shows the terminal window

Assuming you are using Linux, you can completely remove colors:
cd /
vim ~/.bashrc
Click 'i' for insert.
Scroll to force_color_prompt=yes, and comment it out like this #force_color_prompt=yes
Hit Esc. Then Colon. Type "wq" and enter to save.
Or, remove solid background only:
dircolors -p | sed 's/;42/;01/' > ~/.dircolors
Then update the terminal so changes take effect:
source ~/.bashrc
Done!

Related

Change cursor type in VS Code

When I open VS Code, the cursor is shown as a block as shown below, but I want the cursor to be a single vertical line. Is it possible to change this in VS Code so that when I use R, Python, or cmd terminals in R, the cursor is constently a single vertical line, not like the current block type cursor?
Open Settings via Ctrl+,
Search for "Terminal > Integrated: Cursor Style"
Choose "line" from the drop down menu
Results:
Open setting(json) find: "terminal.integrated.cursorStyle": "block" change block to line.

How to change color of keywords in vs code (setting.json)

I want to change color of these words.
"[Monokai Dimmed]": {
// https: //code.visualstudio.com/api/references/theme-color
// "editor.foreground" : "#ff0000",
// "editorLineNumber.foreground" : ""
// "????" : ""
first you should backup the theme you want to make change in it so go to the path and copy all files.
for example we going to make change in theme-defaults
in Linux :
"/opt/visual-studio-code/resources/app/extensions/THEME_YOU_WANT_TO_EDIT/themes/"
in windows:
"C:\program files\Microsoft VS
Code\resources\app\extensions\THEME_YOU_WANT_TO_EDIT\themes"
in windows path can be different depends where you installed.
after backup
open your project with vscode and press Ctrl+Shift+P and search for
">Developer: Inspect Editor"
and select part of the keyword you want to change the color of it.
in this one we going to change function color:
now copy the style name
and open Json files with vscode you backup them before and search for style name in all files until you find it. click the little color icon and select color you want and save it.
unfortunately you can not see change with out reopening the vscode. so close vscode and open it again
as you can see color of function keyword changed.

In VSCode, how can I select current element and it"s surroundings like in WebStorm?

In WebStorm you can select an element and it's surrounding when you do Alt + Arrow Up.
How can you achieve that in VSCode ?
You can try with VSCode buit in Emmet: Balance (outward) command: Ctrl+Shift+A
If the shortcut does not work, follow these steps:
Press Ctrl+Shift+P to open the Command Palette
Type Emmet
Select Emmet: Balance (outward)
This will select the tag where you have your cursor currently in, and all its contents (I understand that by its surroundings you mean the tag contents and the tag itself).
If the tag has as a content a combination of text and tags and your cursor is in the text, the command will select all the content. A new hit of the command will grow the selection to include the tag itself.

Color issues with zsh in wsl

So, I'm trying to setup oh-my-zsh inside a wsl terminal (using powershell as the console here, but I get the same issue in cmd). I think I setup all my colors correctly:
And when I run this:
print -P '%B%F{red}co%F{green}lo%F{blue}rs%f%b'
I get the expected:
But, my prompt is still wrong, as you can tell. I'm using the agnoster theme and the grey background on the pwd there should be blue.
Is there any way to see the escape sequences so I can determine if the problem is with the escape sequence vs the rendering thereof?
We could examine the $PROMPT (or $PS1).
Indeed, oh-my-zsh's agnoster theme uses PROMPT_SUBST for it. So, we can get the raw escape sequences with redirecting or piping the output of print -P:
$ print $PROMPT
%{%f%b%k%}$(build_prompt)
$ print -P $PROMPT | cat -v ;# or redirect to a file as you like
^[[39m^[[0m^[[49m^[[40m^[[39m me#mycomputer ^[[44m^[[30mM-nM-^BM-0^[[30m ~ ^[[49m^[[34mM-nM-^BM-0^[[39m
These raw escape sequences; the ANSI escape codes, are well described in https://en.wikipedia.org/wiki/ANSI_escape_code#Colors. It is the CSI codes CSI n m SGR - Select Graphic Renditoin.
Try to describe the above output:
(^[[39m: The first two characters are escaped by cat -v. We've got ESC[39m.)
^[[39m^[[0m^[[49m: which are from %{%f%k%b%} part of the print $PROMPT output. ^[[39m to reset default foreground color, ^[[0m reset every effect and [[49m to reset default background color.
^[[40m^[[39m me#mycomputer: bg black and fg default color
^[[44m^[[30m M-nM-^BM-0: bg blue and fg default color (M-nM-^BM-0 is cat -v escaped form of )
At this point, it seems that the prompt outputs a bg blue code for pwd. You could check with
print -P '%b%F{red}co%F{green}lo%F{blue}rs%f%b' (Note: the first '%b')
This means the powershell's color pallet setting does not match with the ANSI escape sequences'. We could check whether the terminal's color pallet setting is correct or not with 16colors.sh in xterm distribution if we have sh with seeing the output of sh ./16colors.sh.
(An example xterm default setting's output could be found for example: https://www.in-ulm.de/~mascheck/various/xterm/16-table.html)
It seems that your powershell's Solarized(?) theme maps the ansi color sequence blue (^[[44m or ^[[34m) as grey-ish color for our eyes.

How to change Emacs command line color

Is there a way to change the text of the command line in emacs?
I do not know, what the real name of the command line at the bottom ist, but I marked it on the picture. It is the blue text at the bottom:
The bottom part is called minibuffer if I recall correctly.
M-x customize-face
minibuffer-prompt
Two possibilities for this one:
One: http://www.gnu.org/software/emacs/windows/old/faq4.html
Just scroll down until you see the part about color, in which it gives you the libraries where you can change emacs colors using RGB values.
Two: http://www.emacswiki.org/emacs/ColorTheme
This one's definitely a lot more robust than you need, but it's basically a 'plugin' of sorts that allows you to customize literally any color in emacs, or use premade color themes.