简体   繁体   中英

Visual Studio 2019: Auto Indent

Apologies for the triviality of this problem - I can't seem to find an answer anywhere.

Suppose I have the following block:

int plus(int x, int y)
{
    int z = x + y;% Cursor is here
}

After pressing return, I want the cursor to land here:

int plus(int x, int y)
{
    int z = x + y;
    % Cursor is here
}

But right now, it's landing here:

int plus(int x, int y)
{
    int z = x + y;
% Cursor is here
}

How can I make the editor auto-indent to the beginning of the previous line?

您可以在 Visual Studio 中设置工具 -> 选项 -> 文本编辑器 -> C/C++ -> 制表符 -> 缩进:智能

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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