Visual Studio 22 - Resharper - 无法向下移动行

问题描述 投票:0回答:1

我正在将 Visual Studio 22 与 ReSharper 结合使用。我试图将一行代码向下移出一个块。 ReSharper 拒绝将生产线下移。


#include <iostream>

int main()
{
    if (true)
    {
        std::cout << "true" << std::endl;
        std::cout << "done" << std::endl; // move this line down
    }
    // want the "done" line here, outside of the block
}

我尝试过 ReSharper 键盘快捷键 Ctrl+Shift+Alt+Down,但不起作用。


我也尝试通过工具栏菜单将其向下移动,但这不起作用。

扩展 -> ReSharper -> 编辑 -> 重新排列代码 -> 下移


理想情况下,如何使用 ReSharper 键盘快捷键向下移动此行。

c++ visual-studio resharper jetbrains-ide
1个回答
0
投票

使用 ReSharper,您需要使用

Ctrl+Shift+Alt+Left
将语句移至块外,并使用
Ctrl+Shift+Alt+Right
将其移至块内。当您按住
Ctrl+Shift+Alt
时,ReSharper 将向您显示将当前元素移动到的可用方向。

© www.soinside.com 2019 - 2024. All rights reserved.