visual-studio-2010indentationvisual-assist

Indentation in Visual Studio 2010 for C++ using Visual Assist X


I've come acrossed something annoying about indentation in C++ (using Visual Studio 2010 and Visual Assist X).

The thing is that every time I want to start a new line after keying in ctrl+enter and ctrl+shift+enter, the cursor begins at the very beginning of a new line. This fact annoys me a lot when using the hotkeys inside any braces. For example,

for (int i = 0; i < n; i ++) {
    std::cout << "say something" /* press `ctrl+shift+enter` here*/ << std::endl;
!   |<--
}

After pressing the hotkey (somewhere not at the end of the line, e.g., at the comment /*...*/ above), the cursor will be at the starting position (see ! in the above code). What I want is to automatically put the cursor in the new line with the same indentation of the previous line (see |<--).

How can I make this happen? Many thanks.


Solution

  • Here is an answer from Whole Tomato Software Support Forum