VS2017中是否有内置方法来清理代码中的制表符?

问题描述

当我在ASP中设计页面时,复制和粘贴,添加代码以及移动代码会使标签对齐混乱。我想知道VS2017是否有内置的方式来清理选项卡并使所有内容对齐各自的适当级别。

之前:

                        <asp:DropDownList ID="DropDownList17" runat="server" Width="120px"></asp:DropDownList>
                    </td>

        <td>

         <asp:DropDownList ID="DropDownList20" runat="server" Width="120px"></asp:DropDownList>
                  </td>
        <td>
            
                        <asp:DropDownList ID="DropDownList21" runat="server" Width="120px"></asp:DropDownList>
        </td>
                   <td>
            
             <asp:DropDownList ID="DropDownList22" runat="server" Width="120px"></asp:DropDownList>
        </td>
</tr>
    <tr>

之后:

            <asp:DropDownList ID="DropDownList17" runat="server" Width="120px"></asp:DropDownList>

        </td>
        <td>
            <asp:DropDownList ID="DropDownList20" runat="server" Width="120px"></asp:DropDownList>

        </td>
        <td>
            <asp:DropDownList ID="DropDownList21" runat="server" Width="120px"></asp:DropDownList>

        </td>
        <td>
            <asp:DropDownList ID="DropDownList22" runat="server" Width="120px"></asp:DropDownList>

        </td>
        </tr>

解决方法

要么转到:

编辑>高级>设置文档格式

或者默认快捷键是Ctrl + E,D

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...