1
votes

hi im new to ubuntu and very very new to emacs I've installed them and happily editing files and doing all other things except for the emacs doesn't work for me the way it is supposed to. No syntax highlighting and code hinting and the awful color theme is hurting my eyes please help me configure it have been searching for this on google for about 10-15 hours and ended up instructions like this that i dont even understand :

(add-to-list 'load-path "/path/to/color-theme.el/file")
(require 'color-theme)
(eval-after-load "color-theme"
 '(progn
    (color-theme-initialize)
    (color-theme-hober)))
1
Can you confirm you are using emacs 24 ? (help menu -> about emacs or Ctrl-h Ctrl-a) - Ehvince
the color-theme method is a bit old but still works. for emacs 24 we have M-x load-theme - Ehvince
Syntax highlighting for what exactly? - Thomas
for editing php and c++ - maniteja
maniteja: this Q&A should help you understand some of the essentials about customising Emacs. - phils

1 Answers

2
votes
  1. Add package repositories:

    (package-initialize)
    (add-to-list
     'package-archives
     '("marmalade" . "http://marmalade-repo.org/packages/"))
    (add-to-list
     'package-archives
     '("melpa" . "http://melpa.milkbox.net/packages/"))
    
  2. M-x package-list-packages.

  3. Select some theme, e.g. zenburn-theme (you can use C-s to search for it).
  4. Mark for install with i and execute install with x.
  5. Test this in *scratch*

    (require 'zenburn-theme)
    
  6. If you like it, add it permanently to ~/.emacs, otherwise keep browsing the repositories.