Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to I add color to “ls” or “vi”?

color LS Vi
0
Posted

How to I add color to “ls” or “vi”?

0

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.

0

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.

0

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.

0

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,

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.