簡體   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