繁体   English   中英

如何在像intellij这样的emacs中缩进xml?

[英]How to indent xml in emacs like intellij?

Android Studio创建如下所示的样板xml代码:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    tools:context=".MyActivity">

OTOH通过emacs缩进它,使所有兄弟姐妹彼此对齐,这占用了太多的空间,让我在一个充满intellij用户的团队中生活艰难。

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:tools="http://schemas.android.com/tools"
                android:layout_width="match_parent"
                tools:context=".MyActivity">

如何为这样的缩进xml配置emacs? 我没有用谷歌来搜索这个问题。

web-mode.el默认执行此操作

暂无
暂无

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

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