【问题标题】:Short cut Key for .axml code format in Xamarin Studio(Mac)Xamarin Studio(Mac) 中 .axml 代码格式的快捷键
【发布时间】:2016-09-29 09:16:30
【问题描述】:

我在 SO 上找到。和谷歌,但我找不到解决方案。每当我在.axml 文件中编写代码时,格式不好意味着代码将空间放置到它的格式中。我写的代码就是生成这种格式的代码。

Styles.Xml

<?xml version="1.0" encoding="UTF-8" ?>

<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.ActionBar">

    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>

</style>

    </resources>  

但我想要这样的格式代码:

<?xml version="1.0" encoding="UTF-8" ?>

<resources>
    <style name="AppTheme" parent="Theme.AppCompat.Light.ActionBar">

        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>

    </style>
</resources>  

感谢任何帮助..

【问题讨论】:

  • Ctrl-i 是默认的代码格式化快捷键:Edit` / Format / Format Document

标签: xamarin xamarin.android xamarin-studio


【解决方案1】:

我们谈论的是 xaml 还是 xml 文件?尝试按Control + K,继续按Control,然后按D(不带K

【讨论】:

  • 不工作。当按下Control + K 时,它实际上切断了那条线。和Control + D 不起作用。
猜你喜欢
  • 1970-01-01
  • 2011-06-23
  • 1970-01-01
  • 1970-01-01
  • 2020-12-08
  • 2020-09-14
  • 2012-02-28
  • 1970-01-01
  • 2012-05-05
相关资源
最近更新 更多