When entering a command in the terminal tool window in phpStorm, the command is recognized and highlighted. But since the foreground and background colors are quite the same, I cannot read the command any longer:
The red bar is censorship :-), gray bar is the problem
Where can I change these settings? I don't need commands to be highlighted.
PhpStorm Version: 2021.1.3
Related
I typed reset at the command line inside a Jupyterlab terminal. This has messed up the colors -- now the terminal has a greenish background with yellow underlines for the entirety of the screen.
How can I restore the terminal colors to their initial/default values in a Jupyterlab terminal?
I have just got a new Mac and I am trying to customise the shell so that I can set colors.
I do not want to be using OhMyZsh and all that extra jazz as I don't need it yet.
What I want is the prompt to start out as white, then if the command is a success, including ls commands etc, I want all the output to be green,
If there is a bad command or incorrect syntax or if something fails, I want the output to be red.
For my PS1 Prompt, all I want displayed is the directory path which I have managed to do as can be seen below:
PS1='%F{255}%d -> %f'
How can I modify the above so all positive output is green and all negative output including bad commands, syntax errors etc is red,
If this is even possible?
If you want to print $PS1 the way it appears in your prompt, you need to use
print -P -- "$PS1"
I don't understand how to add colors or change the prompt to dynamic values.
Read the Zsh manual on prompt escape sequences.
How can I have everything coloured green when the command was successful & red, when it was not?
PS1='%(?,%F{green},%F{red})%n#%, %1~ %#%f '
I am using iTerm2 (Build 1.0.0.20140112) on OS X 10.8.5. When I try to view the man pages I am not able to view the command when the man page opens up. I can read the rest contents for that command in the man page, however I am not able to see the command itself. All the occurrence of the command are invisible in the man page. Snapshot attached.
That's may because of the color!
the bold text will show up white, which is the same as your background color.
change your background color to gray,
or change the bold text color to other color.
(both in iTerm2's settings)
or use this command:
man xxx | cat
I'm using OSX snow leopard, for the record.
When I use emacs straight from terminal, I have a color set (e.g. for c/c++) that I'm very happy with---green on black, red comments, colored key words... etc etc. Some of this is set in my 'terminal preferences', and some is in my ~/.emacs file (see below). When I run emacs from screen, the basic color-scheme is the same (green on black), but the coloring is different (e.g. comment characters are red, but not the entire comments) -- and really annoying.
Any help would be appreciated!
In my '.emacs' file (this stops working in gnu-screen emacs):
(global-font-lock-mode t)
(custom-set-faces
'(font-lock-comment-face
((((class color) (background light))
:foreground "tomato")
)))
In my '.screenrc' file:
shell -$SHELL # colors still don't work without this
#term xterm-256color # using this doesn't fix the colors (suggested on some forums)
altscreen on
startup_message off
I thought that the command 'shell -$SHELL' in my .screenrc file made the command prompt in screen the same as the default --- it does make my command line say 'computername:/DIR/ username$' instead of just 'bash-3.2$'
=================================================================
Solution: Thanks to Greg E.
I needed to set my terminal emulator in screen to match that of my normal shell. To do this, I added
export TERM='xterm-color'
to ~/.bash_profile
For some reason, 'term xterm-color' in the '~/.screenrc' file didn't work.
My suspicion is that, while your terminal may be compiled with support for more than the standard 16 colors, your particular version of GNU screen may not be. I'm not very familiar with OSX, but on Linux I'd check whether the output of tput colors differs between a plain terminal and one running screen (I'd expect there to be some OSX equivalent if tput is not available). If it does, you may need to install (or manually compile) a different build of screen that includes support for additional colors (normally, 256 is the maximum, but 88 is also common, while 16 is the default minimum).
Edit: Ultimately, the correct solution proved to be manually setting the $TERM environment variable (see comments below).
I'm working with the Vim 7.2 that comes with Mac OS 10.6.1 (Leopard), using the Mac's "Terminal" app. I'd like to use a fancy color scheme. I did this...
:syntax on
Then this...
:colorscheme slate
:colorscheme elflord
:colorscheme desert
etc...
Syntax highlighting is working, but I'm finding that regardless of the scheme I choose, the only colors displayed are the basic Red, Blue, Cyan, Gray, etc.
Is there a way to get the Terminal app to display a larger collection of colors to allow some more subtle schemes?
Create a .vimrc file on your home ~/ folder and then edit it with vim ~/.vimrc. You can try adding syntax on inside ~/.vimrc file. The following command does that:
echo "syntax on" >> ~/.vimrc
It will highlight your code syntax on vim
You need to create file ~/.vimrc and add syntax on in that file
vi ~/.vimrc
syntax on
save the file
and run your vim
Add "syntax on" to the file /usr/share/vim/vimrc and you'll get highlighting in your files every time you edit one.
# vi /usr/share/vim/vimrc
Add this line at the end of the file:
syntax on
Now you'll get highlighting when you edit whatever's file.
The Terminal.app supports AFAIK only 16 colors; iTerm supports more colors or you use mvim (as suggested by Daniel).
You might want to consider using a version of Vim that is a native Mac app (that runs in a window).
MacVim has great color schemes and you can still launch it from Terminal like so:
$ mvim file.txt
That will open your file in a new Vim window.
#ashcatch - Can't leave a comment, but wanted to add that iTerm has other advantages over Terminal.app such as sensible copy and paste (configurable 'word' regex for easy double click selection of paths/urls, middle click paste) and terminal mouse support (:se mouse=a in vi to get mouse text selection, moving of window borders etc.)
I'd be lost without it.