Emacs Coloring for perl/php/html/etc

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

  1. gcawood

    gcawood Administrator Staff Member

    Messages:
    49
    Likes Received:
    14
    Trophy Points:
    0
    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

    Messages:
    49
    Likes Received:
    14
    Trophy Points:
    0
    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

    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    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