Can I get syntax highlighting in the Terminal?

Discussion in 'Mac Apps and Mac App Store' started by Kalixa, Jan 11, 2008.

  1. Kalixa macrumors member

    Joined:
    Jun 25, 2007
    #1
    I remember using syntax highlighting in the Terminal when I was on Linux. But I have never had it on my mac, and it's starting to annoy me. For example, folders would be another color than text files. Can someone tell me how to enable this?
     
  2. deboni macrumors member

    deboni

    Joined:
    Jun 9, 2007
    Location:
    Oakland, CA
    #2
    coloring is available in TCSH

    Check the tcsh man page for details; a quick perusal and search found me the shell variable "color" and the environment variable "LS_COLORS". I'm not sure how to use them or what their differences are, but both seem to work.

    For syntax coloring, do ":syntax on" in VIM.

    Tom
     
  3. Kalixa thread starter macrumors member

    Joined:
    Jun 25, 2007
    #3
    Doesn't Terminal use bash?

    Thanks for the tip about VI, but I only need it in the Terminal.
     
  4. pokrface macrumors member

    Joined:
    Dec 14, 2007
  5. Kalixa thread starter macrumors member

    Joined:
    Jun 25, 2007
    #5
    Where is the .bash_profile file located? I tried looking in my home folder, and it wasn't there.
     
  6. rhowell macrumors newbie

    Joined:
    Feb 13, 2008
    #6
    You should add

    Code:
    export CLICOLOR=cons25
    to ~/.profile (create that file if it doesn't exist) You will need to close that terminal session and reopen it, or just source the .profile file to reload it

    Code:
    macuser:~$ . .profile
     
  7. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #7
    In your home directory. /home/*username*

    Use ls -lsa to see hidden files and display the results in a pleasing manner :).
     
  8. krimb1 macrumors newbie

    Joined:
    Aug 22, 2006
    #8
    Thanks, this was just what I was looking for!
     

Share This Page