人们在使用 Emacs 编辑包含 CSS、javascript 和 HTML 的网页时使用什么模式? [英] What mode do people use when using Emacs to edit web pages that contain CSS, javascript, and HTML?

查看:20
本文介绍了人们在使用 Emacs 编辑包含 CSS、javascript 和 HTML 的网页时使用什么模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常的代码是这样的:

<头><style type="text/css">正文 { 字体大小:12pt;字体系列:Arial;}....</风格><script type="text/javascript" src="jquery.1.3.2js"></script><script type="text/javascript"><!--$(document).ready(function(){...});...--><元.../><身体><div><p>....</p>...

....

我喜欢 javascript 模式的语法高亮和缩进.对于 HTML 的 sgml-mode 也是如此.我还可以在打开的标签上自动完成.CSS-mode 不是那么重要,所以它不是那么重要.

这是 3 种不同的语言和 3 种模式.现在我在编辑不同的部分时一直在手动切换模式.这工作,有点.

有人有更好的方法吗?

解决方案

我认为 mumamo 通常用于此.http://www.emacswiki.org/emacs/MuMaMo

typically the code is something like:

<html>
  <head>
    <style type="text/css">
       body { font-size:12pt; font-family: Arial;}
        ....
    </style>
    <script type="text/javascript" src="jquery.1.3.2js"></script>
    <script type="text/javascript">
    <!--
        $(document).ready(function(){
          ...
        });
        ...
    -->
    </script>
    <meta ... />
  </head>
  <body>
    <div>
      <p>
       ....
      </p>
      ...
    </div>
    ....
  </body>
</html>

I like javascript-mode for the syntaxt highlighting and indenting. Likewise for sgml-mode for the HTML. Also I get auto-complete on the open tags. Css-mode is not so important so it's not so much a priority.

That's 3 disparate languages and 3 modes. Right now I've been swapping modes manually as I edit different sections. This works, sort of.

Anyone got a better approach?

解决方案

I think mumamo is generally used for this. http://www.emacswiki.org/emacs/MuMaMo

这篇关于人们在使用 Emacs 编辑包含 CSS、javascript 和 HTML 的网页时使用什么模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆