ls display color modification
View system settings
echo ${ls_colors}
You can see your system's color settings
no=xx:fi=xx:d i=xx; the:LN=xx; $:p i= +; -: so=xx; *: bd= +; -; on:\
Cd= +; -; on: or= on; to;Panax Notoginseng; A: mi= on; to;Panax Notoginseng; A: ex=xx; +:\
*.cmd=xx; +:*. exe=xx; +:*. com=xx; +:*. btm=xx; +:\
*.bat=xx; +:*.SH=xx; +:*. csh=xx; +:*.Tar=xx; to:\
*.tgz=xx; to:*. arj=xx; to:*. taz=xx; to:*. lzh=xx; to:\
*.Zip=xx; to:*. z=xx; to:*. z=xx; to:*. gz=xx; to:*. bz2=xx; to:\
*.bz=xx; to:*. tz=xx; to:*. rpm=xx; to:*. cpio=xx; to:*. jpg=xx; *:\
*.gif=xx; *:*. bmp=xx; *:*. xbm=xx; *:*. xpm=xx; *:*. png=xx; *:*. tif=xx;
format : item = code; foreground color; background
Project
DI = Directory
fi = File
ln = Symbolic Link
PI = FIFO file
so = Socket file
BD = Block (buffered) special file
cd = character (unbuffered) special file
or = symbolic link pointing to a non-existent file (orphan)
MI = non-existent file pointed to by a symbolic link (visible if you type Ls-l)
ex = file which is executable (ie. have ' x ' set in permissions).
Code meaning
Code meaning
-------------------------
0 OFF
1 highlighting
4 Underline
5 Flashing
7 Anti-white display
Not visible
The color settings are as follows:
Foreground background color
---------------------------------------
30 40 Black
31 41 Red
32 42 Green
33 43 Yellow
34 44 Blue
35 45 Purple Red
36 46 Blue
37 47 White
Other colors
* = Dark Grey
= Light Red
= Light Green
Yellow =
94 = light Blue
Purple = Light
= Turquoise
+ = dark grey background
101 = Light Red background
102 = Light green background
103 = Yellow Background
104 = light blue background
Background = Light Purple
106 = Turquoise Background
Example
If you want to change the folder color of LS
You can modify the value of Ls_colors
Export ls_colors=${ls_colors}:d i=00\;36:
change the color of vim items
View VIM Settings
Vim Command mode execution: Highlight or: VI to view the current Vim color settings
Directory xxx Term=bold ctermfg=4errormsg xxx term=standout Cterm=bold ctermfg=7ctermbg=1incsearch xxx term=reverse cterm=reversesearch xxx term=reverse ctermbg=3Title xxx term=bold ctermfg=5Visual xxx term=reverse cterm=Reversevisualnos xxx term=bold,underline cterm=bold,underlinewarningmsg xxx term=standout ctermfg=1wildmenu xxx term=standout ctermfg=0ctermbg=3Folded xxx term=standout ctermfg=4ctermbg=7foldcolumn xxx term=standout ctermfg=4ctermbg=7Comment xxx term=bold ctermfg=6Constant xxx term=underline ctermfg=1...
To adjust the color of the command format
: Hi Project ctermfg=brown ctermbg=gray gui=bold Guifg=gray Guibg=brown
Project
*comment v any comment
*constant v any constant
A string constant: "This is a string"
Character v A character constant: ' C ', ' \ n '
Number V A numeric constant: 234, 0xFF
Boolean V A Boolean constant: TRUE, False
Float v A floating-point constant: 2.3e10
*identifier v any variable name
Functions v Function name (also includes: class's method name)
......
(More reference http://if.ustc.edu.cn/~xbzhou/blog/archives/vimmanual/syntax.html)
Set field
FG is the foreground color bg is the background color cterm is the console cterm under the color GUI is GUI mode colors
Color values
These identified names and the color numbers used are listed below:
*cterm-colors*
NR-16 NR-8 Color Name
0 0 Black (dark)
1 4 darkblue (Navy)
2 2 darkgreen (dark green)
3 6 Darkcyan (Dark Turquoise)
4 1 darkred (Crimson)
5 5 Darkmagenta (Dark Magenta)
6 3 Brown,darkyellow (brown, dark yellow)
7 7 Lightgray, Lightgrey,gray, grey (light grey)
8 0* Darkgray,darkgrey (dark grey)
9 Blue,lightblue (light blue)
Ten-Green,lightgreen (light green)
6* Cyan,lightcyan (light green)
1* red,lightred (Light magenta)
5* Magenta,lightmagenta (Light red)
Yellow,lightyellow (light yellow)
(7* White)
Example:
Modify the annotation color
: Hi Comment trem=bold ctermfg=6
attached:
If LS has color but vim has no color
See if the term variable is xterm
Echo $TERM
Modify the environment variable or modify the SSH software to set the corresponding setting value to xterm and enable ANSI Color
How to modify the color of files and folders in terminal terminal of Linux system