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 do I add color to “ls” or “vi”?

color LS Vi
0
Posted

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

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.