简体   繁体   English

Web模式无法在emacs中加载

[英]Web-mode does not load in emacs

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. 我对emacs还是很陌生,目前正在尝试根据自己的需要正确配置它,但是我根本无法使其加载web-mode

So, this is what I've done: 所以,这就是我所做的:

  1. Downloaded web-mode.el from GitHub 从GitHub下载了web-mode.el
  2. Made sure the file is located in the correct directory: ~/.emacs.d/web-mode.el 确保文件位于正确的目录中: ~/.emacs.d/web-mode.el
  3. Used the installation instructions from the official page 使用了官方页面上的安装说明

My .emacs file now looks like this 我的.emacs文件现在看起来像这样

Issue: 问题:

When I'm trying to edit any of the file types specified in the .emacs file, it only runs the default modes. 当我尝试编辑.emacs文件中指定的任何文件类型时,它仅运行默认模式。 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. PHP Abbrev for PHP等...我没有收到任何错误消息,当我运行--debug-init它没有任何输出。

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 Emacs版本:2012年3月1日在sl6.fnal.gov上发布的GNU Emacs 23.1.1(x86_64-redhat-linux-gnu,GTK +版本2.18.9)

OS: Scientific Linux 操作系统:Scientific Linux

Does anyone know how I can troubleshoot this further, or have solved similar issues? 有谁知道我可以进一步解决这个问题,或者解决了类似的问题?

You should let el-get install it for you. 您应该让el-get为您安装它。 El-get is a package manager for emacs. El-get是emacs的软件包管理器。 It can install packages from github, emacswiki, elpa, an url, … http://wikemacs.org/index.php/El-get 它可以安装来自github,emacswiki,elpa,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. Emacs 24默认具有package.elELPA One can install it on emacs 23, but my experience isn't conclusive so I'd advise sticking with el-get, which is great. 可以将其安装在emacs 23上,但是我的经验尚不确定,因此我建议您坚持使用el-get,这很棒。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM