Emacs Coloring for perl/php/html/etc

Discussion in 'Shell / Command Line' started by gcawood, Oct 29, 2011.

  1. gcawood

    gcawood Administrator Staff Member

    Joined:
    Oct 28, 2011
    Messages:
    49
    Likes Received:
    19
    If you are an Emacs user, then it is handy to be able to colorize your scripts correctly. Looking at code that isn't colorized can make your eyes bleed. Here is what I put into my .emacs file for my user. (so, if you are root, create/edit this file /root/.emacs)

    Code:
    (if (fboundp 'global-font-lock-mode)
        (global-font-lock-mode 1)        ; GNU Emacs
      (setq font-lock-auto-fontify t))   ; XEmacs
    


     
  2. gcawood

    gcawood Administrator Staff Member

    Joined:
    Oct 28, 2011
    Messages:
    49
    Likes Received:
    19
    Also, to switch emacs color modes is pretty easy.

    Code:
      
    [esc]-x html
    [esc]-x php
    [esc]-x pl
    
    etc...
     
  3. germs

    germs New Member

    Joined:
    Nov 1, 2011
    Messages:
    12
    Likes Received:
    0
    Nice to see something that can make the code less soul destroying and eye raping, thanks mate, will give it a try.
     

Share This Page