Xmanager Knowledge Base

Displaying color in vI and VIM

Last modified: Wednesday, February 27, 2013 9:28 PM


This article explains how you can use colors when listing folder and files with ‘ls’ command 


To use colors when listing folder and files with ls command..

1. Terminal emulators that can use colors: Xterm, gnome-terminal, etc. supports 256-color
2. Shell that recognizes color: BASH, TCSH & etc.
3. terminal environment settings of shell  for color recognition: TERM environment changes must be in xterm, ansi,  or other color recognizing terminal type. With the following command, you can check the terminal type and change.

$ echo $TERM
$ export TERM=xterm (or setenv TERM xterm)

4.  Utility programs that supports color: ls, vim & etc.
5. Utility programs settings that supports color: for â€˜ls’  ‘--color=tty’ option should be used. If alias is set, it is easier to work.

$alias ls=’ls --color=tty’