Reputation: 21
I'm pretty new to emacs and I'm currently trying to configure it properly for my needs, but I can't make it load web-mode
at all.
So, this is what I've done:
web-mode.el
from GitHub~/.emacs.d/web-mode.el
My .emacs
file now looks like this
Issue:
When I'm trying to edit any of the file types specified in the .emacs
file, it only runs the default modes. PHP Abbrev for PHP etc... I'm not receiving any error messages and when I'm running --debug-init
it does not give any output.
Emacs version: GNU Emacs 23.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.18.9) of 2012-03-01 on sl6.fnal.gov
OS: Scientific Linux
Does anyone know how I can troubleshoot this further, or have solved similar issues?
Upvotes: 2
Views: 2334
Reputation: 3
In your .emacs file PHP in web-mode does not work because of this line
(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode))
The problem here is that the .tpl and .php is together
You can split the two apart like in this lines of code
(add-to-list 'auto-mode-alist '("\\.php\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.tpl\\" . web-mode))
Or just remove the .tpl
(add-to-list 'auto-mode-alist '("\\.php\\'" . web-mode))
I hope this helps!
Upvotes: 0
Reputation: 18395
You should let el-get
install it for you. El-get is a package manager for emacs. It can install packages from github, emacswiki, elpa, an url, … http://wikemacs.org/index.php/El-get
It's very handy, you can update scripts easily, it manages dependencies, it lets you discover many stuff, you can easily share your config accross machines, etc.
Emacs 24 has package.el
or ELPA
by default. One can install it on emacs 23, but my experience isn't conclusive so I'd advise sticking with el-get, which is great.
Upvotes: 1