Decorate your terminal with a rich array of 256 colors

Source: Internet
Author: User

Decorate your terminal with a rich array of 256 colors

Terminals are not only black and white. Although using terminals can improve efficiency, this does not mean that we can only face non-black and white interfaces. Some applications on your terminal may have used 16 colors to display part of the content, but it is not delicate yet. In fact, many terminals, such as xterm, urxvt, and Iterm. app in Mac OSX, can support 256 colors. You can see more delicate and elegant colors under these terminals.

Several important program configurations are involved here for your reference. Note that not all terminal and command line applications support the 256 color.

 

Vim

It can distinguish between different colors and make vim look more beautiful. Click here to download the color file. The color file can be introduced to your vim configuration as follows:

  1. if $TERM =="xterm"|| $TERM =="rxvt"|| $TERM =="xterm-256color"|| $TERM =="rxvt-unicode"||&term =~"builtin_gui"|| $TERM =="dumb"
  2. set t_Co=256
  3. colorscheme calmar256-dark
  4. else
  5. colorscheme desert
  6. endif

 

Mutt

Here, you can introduce the color scheme to your. muttrc through source:

  1. source ~/.mutt/mutt_color_256

 

Slrn

Slrn supports 256 colors, but many elements do not support color differentiation. The color scheme is directly written in the configuration file.

 

Git

Look at the output of git log, isn't it softer? The configuration file is here.

 

Man/less

For Xterm/Urxvt, changing the foreground/background/bold/underline/italic color of the terminal allows less to display better highlighted effects. Less is used in man page display, so you will find that your man display is more beautiful. The configuration file is here.

In addition, you can$LESSAdd Environment Variables-JIn this way, a "*" is displayed before the row where the result is located.

 

Window Status Bar

Many people prefer to display a status bar below the terminal window, especially when using screen to split the window into several subwindows.

The configuration file is here.

 

Ls

The color output of ls can also be better. The configuration file is here.

 

Grep

You can set grep to display matching content in green:

  1. export GREP_COLOR='01;32'# color grep matches green
  2. aliasgrep='grep --color'

Do you have some color schemes? Welcome to share.

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.