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
Related
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
I'm running windows 10 and I've just installed Git version 2.29.2.windows.2
I'm trying to learn Git on Udemy and the instructor can clear his screen by typing clear. However, he can also scroll up and down to see the commands he'd previous typed after he's cleared them. I'm unable to do that. I can't scroll with the mouse. Page up/Down don't do anything and nor do the arrow keys. Once I've typed clear, all my previous commands seem to disappear and I can't access them. I've had a look at the Git Bash options and I can't see anything which would fix this. I've also searched this site for answers but the most recent one I could find was from 2016 and is out of date and doesn't work.
Could anyone explain how I can scroll once I've entered clear so that I can see my previous commands? Thanks.
It's not normal for the mouse scroll to retrieve history entries. It usually scrolls up the terminal window. Here are a few things to try.
Make sure you're using the Git Bash terminal using Mintty, not the Windows command prompt running bash.
Up-arrow and down-arrow are the same as Ctrl-P and Ctrl-N.
Run stty sane.
Do bind -p |less and look at the entries for next-history and previous-history. They should look like:
"\C-n": next-history
"\eOB": next-history
"\e[B": next-history
"\C-p": previous-history
"\eOA": previous-history
"\e[A": previous-history
Check your ~./inputrc and /etc/inputrc files.
Read the Bash man page sections for READLINE and bind.
While inside of tmux, I can press PREFIX w, which runs tmux choose-tree.
This brings up an interactive session/window/pane selector that also displays a
preview of the highlighted node.
From a normal shell outside of tmux, I can run tmux attach -t '$1:1' to attach
to any session or window by name or index (see man tmux section "Clients And
Sessions").
Is there command similar to tmux attach -t where I can pass in a session/window
name/index and see a preview of it, like to the one used in tmux choose-tree? Ideally this command would just show the lower portion of this
image:
The goal here is to pipe a list of tmux windows from all sessions to
fzf, and pass a separate command in fzf's
--preview flag to show a preview of the session/window currently highlighted
while fuzzy finding.
I have a draft working
here.
It populates a preview with the session/window index in a tmux-compliant format
and will switch to the selected session.
This can be partially implemented by means of this recent commit: https://github.com/tmux/tmux/commit/2628af573d98f7bdd4db02c7a80c860b867a45fb
I do so here: https://github.com/petobens/dotfiles/commit/c21c306660142d93d283186210ad9d301a2f5186 in order to get the following:
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.