Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VS2015 changes
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

foxmuldr
Tomato Guru

USA
384 Posts

Posted - May 03 2016 :  10:27:38 AM  Show Profile  Reply with Quote
#1

I've recently switched to VS2015. It is the first VS since 2010 that I've found remotely desirable, and I must say it's the best VS to date.

However, there are some UI differences I've noticed, and I'm not able to resolve it through settings tweaks. I was hoping someone could point me to what I'm doing wrong.

I'm intending to write this:

if (x == 4)
{
    // Code goes here
}


I'm currently sitting here with my caret:

if (x == 4)
|


I go to type "{" and it does this:
if (x == 4)
{|}


With the caret positioned on the "}" so new text is inserted there. In VS2008, and VS2010, when I would type the "{" character, it would do this:

if (x == 4)
{
    |
}


With my caret indented on the blank line as indicated.

What settings do I need to look at to restore that VS2008/VS2010 behavior?

Best regards,
Rick C. Hodgin

foxmuldr
Tomato Guru

USA
384 Posts

Posted - May 03 2016 :  10:34:03 AM  Show Profile  Reply with Quote
#2

I'm intending to do this:


//////////
//
// A description of this function goes here
//
//////
    void some_function1(void)
    {
        // Code goes here
    }




//////////
//
// A description of this other function goes here
//
//////
    void some_function2(void)
    {
        // Code goes here
    }


I currently have this:


//////////
//
// A description of this function goes here
//
//////
    void some_function1(void)
    {
        // Code goes here
    }


In VS2008/VS2010 I could type this:


//////////
//
// A description of this function goes here
//
//////
    void some_function1(void)
    {
        // Code goes here
    }
;


With my caret sitting after the left-justified semicolon, and then press return several times and it would align with the semicolon as the line above it which had some non-comment syntax on it. In VS2015, however, when I press enter after the semicolon line, it ignores the semicolon and aligns with the "}" above character.

It causes me to have to then type the extra backspace on each line when typing my comment. Tog et it left-justified or aligned with where the semicolon is, it requires this keystroke sequence, as it auto-indents each line regardless of previous content:


    [backspace]//////////
    [backspace]//
    [backspace]// A description of this other function goes here
    [backspace]//
    [backspace]//////


Is there a way in VAX or VS2015 settings restore that VS2008/VS2010 behavior in VS2015?

Thank you in advance.

Best regards,
Rick C. Hodgin
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - May 03 2016 :  2:47:44 PM  Show Profile  Reply with Quote
For your first point, try turning Off:

IDE Tools menu -> Options -> Text Editor -> C/C++ -> General -> Automatic brace completion

since this is where the closing bracket, and it's formatting, is coming from. Alternatively, turn Off:

VA Options -> Editor -> Insert () and closing } ) ] ' "

and OK the VA options dialog, at which point VA will tell you about this IDE option. If you then turn this VA option back on again, you will be asked if you want VA to turn off the IDE option for you.

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - May 03 2016 :  3:19:55 PM  Show Profile  Reply with Quote
For your second post, you are going to need to look at:

IDE Tools menu -> Options -> Text Editor -> C/C++ -> Formatting

there are quite a few formatting options in VS2015, and these are going to be what is effecting your code formatting.

You might also want to set:

IDE Tools menu -> Options -> Text Editor -> C/C++ -> Tabs -> Indenting = Block

which should help a bit, but if the IDE formatting settings keep changing and resetting your formatting, this is where you are going to have to look. However I don't know if you can get the IDE to format your code how you want it, and if not, you may have to change your formatting style, or look for a code formatting extension.

Currently we don't have any plans to add code formatting options to VA.

zen is the art of being at one with the two'ness
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - May 03 2016 :  10:31:14 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline
Currently we don't have any plans to add code formatting options to VA.



I don't really want new formatting options. I just want it to honor the semicolon's position as the left-most character, rather than ignoring it. And I do realize this may be a feature bleeding through from VS2015's editor, and not something VA related.

Best regards,
Rick C. Hodgin

Edited by - foxmuldr on May 03 2016 10:38:29 PM
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - May 03 2016 :  10:39:44 PM  Show Profile  Reply with Quote
I can't get either #1 or #2 to work in VS2015 as they did in VS2008/VS2010.

Best regards,
Rick C. Hodgin
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - May 04 2016 :  1:04:17 PM  Show Profile  Reply with Quote
One at a time, #1 first, what do you have:

VA Options -> Editor -> Insert () and closing } ) ] ' "

set to, and what is the closing brace position set to?

What do you have:

IDE Tools menu -> Options -> Text Editor -> C/C++ -> General -> Automatic brace completion

set to?

zen is the art of being at one with the two'ness
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Mar 01 2021 :  1:45:49 PM  Show Profile  Reply with Quote
quote:
Originally posted by foxmuldr

I can't get either #1 or #2 to work in VS2015 as they did in VS2008/VS2010.



I just found a workaround for this today by accident.

In VS2008/VS2010 you can have an indented function or member function and press enter and backspace to go to the beginning of the line and type in two semicolons, then when you press enter multiple times it will be left-aligned. One semicolon was required in VS2008/VS2010, but with VS2015 or later two are required.

It may seem a trivial thing, but if you indent your code, and do not indent your comments, it's a lot of extra typing. With the double-semicolon, now all you have to do is delete that double-semicolon line when you're done, or leave it in.

In VS2008/VS2010 I could type this:
//////////
//
// A description of this function goes here
//
//////
    void some_function1(void)
    {
        // Code goes here
    }
;
|


In VS2015 or later, use this:
//////////
//
// A description of this function goes here
//
//////
    void some_function1(void)
    {
        // Code goes here
    }
;;
|


The | represents the cursor location.

Edited by - foxmuldr on Mar 01 2021 1:47:43 PM
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000