How to I add color to “ls” or “vi”?
You can also get color from the tcsh builtin ls, if you use the tcsh shell (included in Solaris 8 and later), by simply doing: alias ls ls-F ; set color=ls-F Search for “color” in the tcsh man page for details. |If color output still doesn’t appear, for either of these, make sure |your terminal emulator supports color (e.g., dtterm) and that your Solaris /usr/openwin/bin/xterm supports color starting in Solaris 9, and gnome-terminal from Sun’s GNOME release also supports color.
For “ls” you need the GNU “fileutils” version of ls. Obtain the binary from http://www.sunfreeware.com/ or compile it yourself from source from http://www.gnu.org/ I only use “ls” out of all the utilities in the package and install it in /usr/local/bin/ls. I then use this alias: alias ls=’/usr/local/bin/ls –color=auto’ (remove the “=” for *csh shells). For vi, I use vim (or gvim for X Windows). It is also available from http://www.sunfreeware.com/ or directly from http://www.vim.org/. You may need to add “syntax on” in your $HOME/.vimrc file to enable syntax coloring. If color output still doesn’t appear, for either of these, make sure your terminal emulator supports color (e.g., dtterm) and that your $TERM is set correctly.
For “ls” you need the GNU “fileutils” version of ls. Obtain the binary from http://www.sunfreeware.com/ or compile it yourself from source from http://www.gnu.org/ I only use “ls” out of all the utilities in the package and install it in /usr/local/bin/ls. I then use this alias: alias ls=’/usr/local/bin/ls –color=auto’ (remove the “=” for *csh shells). For vi, I use vim (or gvim for X Windows). It is also available from http://www.sunfreeware.com/ or directly from http://www.vim.org/. You may need to add “syntax on” in your $HOME/.vimrc file to enable syntax coloring. If color output still doesn’t appear, for either of these, make sure your terminal emulator supports color (e.g., dtterm) and that your $TERM is set correctly. To verify you can display color, copy, paste, and execute this line in your shell prompt (you should see the letters “blue” highlighted in blue): /bin/echo ‘\033[0m\033[01;34mblue\033[0m’ _________________________________________________________________ (6.
For “ls” you need the GNU “fileutils” version of ls. Obtain the binary from http://www.sunfreeware.com/ or compile it yourself from source from http://www.gnu.org/ I only use “ls” out of all the utilities in the package and install it in /usr/local/bin/ls. I then use this alias: alias ls=’/usr/local/bin/ls –color=auto’ (remove the “=” for *csh shells). For vi, I use vim (or gvim for X Windows). It is also available from http://www.sunfreeware.com/ or directly from http://www.vim.org/. You may need to add “syntax on” in your $HOME/.vimrc file to enable syntax coloring. If color output still doesn’t appear, for either of these, make sure your terminal emulator supports color (e.g., dtterm, xterm, and gnome-terminal) and that your $TERM is set correctly. To verify you can display color, copy, paste, and execute this line in your shell prompt (you should see the letters “blue” highlighted in blue): /bin/echo ‘\033[0m\033[01;34mblue\033[0m’ You can also get color from the tcsh builtin ls,