emacs 怎么格式化html代码呢?
我用下面这段
;;格式化整个文件函数
(defun indent-whole ()
(interactive)
(indent-region (point-min) (point-max))
(message "format successfully"))
;;绑定到F7键
(global-set-key [f7] 'indent-whole)
格式化html代码。格式化非常丑,效果如下
<!--main-->
<div class="main">
<div class="col-left">
<div class="news-hot">
<div class="content">
emacs有什么好的方法格式化代码?特别是格式化html代码吗?
emacs 格式化html 代码
-
- 帖子: 237
- 注册时间: 2011-10-11 10:16
-
- 帖子: 237
- 注册时间: 2011-10-11 10:16
Re: emacs 格式化html 代码
这个html 格式化代码,意外解决了,
和dw格式源码的效果差不多。 又来了一个问题。。。
emacs就是解决一个一个问题的过程。。

emacs就是解决一个一个问题的过程。。
- reverland
- 帖子: 1317
- 注册时间: 2011-11-26 15:57
- 系统: windows xp
- 联系:
Re: emacs 格式化html 代码
我来翻译下lz的话:用emacs就是折腾……
托在github上的jekyll博客
Always Look on the Bright Side of Life
Always Look on the Bright Side of Life