Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Anoying auto formating

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Alexis Pautrot Posted - May 25 2011 : 09:16:56 AM
Hi !

The auto completion of writing "pObject -> MyMethod()" (notice space around ->) removes the latest space, and screw the formatting I'm using, which is really really anoying.

Could VA only do what it is supposed to ? Auto completing code, but NOT auto formating anything ?

Seems like a bug to me.

Thank you !
13   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 15 2012 : 11:33:18 AM
I am glad you are finding this useful, I hope it helps you
Alexis Pautrot Posted - Aug 14 2012 : 04:26:43 AM
Oh thank you so much Feline for the link ! This tool seems wonderful !!!
Alexis Pautrot Posted - Aug 14 2012 : 04:13:42 AM
I don't think "Convert dot to" will help me on that, because my formatting is like this :

MyClass* pClass = new MyClass();
pClass -> DoSomething ( 5, "babla", ( 15.0f + 2.0f ) );
pClass -> GetData() -> GetCount();
...

I'm using a lot of spaces everywhere. And because, typing " -> " is too long, I'm using a macro that write " -> " associated to a shortcut of one key.

Maybe it's time for me to stop putting all these spaces everywhere :)

Thank you anyway.
kevinsikes Posted - Aug 14 2012 : 12:28:20 AM
Alexis, have you tried allowing Visual Assist X to insert the -> operator for you by typing a dot after your pointer?

VA Options | Advanced | Corrections | Convert dot to -> (in C/C++)

There's an additional option to convert dot to -> if operator -> is overloaded, which is convenient when using smart pointers.
feline Posted - Aug 13 2012 : 6:12:28 PM
Unfortunately no progress yet to report on this, and this is quite a specialised effect, so fixing this is not going to help many people. I don't know which IDE you are using, but Visual Studio 2012 no longer supports macros, so you won't be able to use this technique as and when you upgrade to this IDE.

Have you considered using a code formatting tool, to change "->" into " -> "? I am not sure if this would be an option, but it might be. This is a commercial code formatting tool that looks good, but I have never used it personally, so I am not sure quite what it can do.

http://www.profactor.co.uk/stylemanager.php
Alexis Pautrot Posted - Aug 13 2012 : 03:49:51 AM
Hello

Still not reached the top of the list ? :)

I couldn't find a workaround for this one. Can you simply tell me if there is a chance for it to be corrected or if it is too uncommon to be treated ?
Alexis Pautrot Posted - Oct 14 2011 : 05:55:32 AM
Thank you Feline, this is really kind :)
feline Posted - Oct 13 2011 : 2:16:53 PM
Unfortunately no progress yet on this, but it is still in our list of bugs to fix. I have increased the priority on this bug for you, hopefully this will help a bit.
Alexis Pautrot Posted - Oct 12 2011 : 08:07:11 AM
Hi again !
How can I follow this case 57809 ?
I guess I'm probably the only one who is annoyed by it, but I'm still hoping you will resolve it in the following releases.

Thank you in advance ! Bye !
accord Posted - May 31 2011 : 8:06:21 PM
Brilliant discovery! I was able to reproduce the problem using a bound macro:

case=57809
Alexis Pautrot Posted - May 31 2011 : 05:38:33 AM
Ok I finally found it, here are the steps to reproduce.

I'm using a VB macro in order to write " -> ", which is :

Sub Indirection()
ActiveDocument.Selection.text() = " -> "
End Sub

I have binded it to CTRL ALT '+'.

When I use this macro, " -> " is inserted, then the suggestions box pops up and if I choose any, the last space is eaten.

I will try to change my macro to avoid this side effect but could you glance at it ? Thank you.
Alexis Pautrot Posted - May 31 2011 : 04:37:38 AM
Me neither, I can't reproduce it in a new project. And I'm also unable to reproduce it in our current project.

When it happened, I was writing first letters of method's name, then hitting enter to accept suggestion. I was more or less used to this behaviour of eating the last space because VAssist did it since so long (I even can't remember it working) that I was sure it was a wanted behaviour.

I did a Rebuild symbol database and a Clear cache history two days ago after added some macro to stdafx.h in C:\\Program Files\\Visual Assist X\\Misc. I don't know if there is a possible side effect.

Now I know it should not happen I will try to track it next time it happens, and give you as much info I will have in order to reproduce it.

Thanks you.
accord Posted - May 25 2011 : 12:28:33 PM
I wasn't able to reproduce the problem here. Are you just writing the code or do you accept the suggestion? I tried both on this code:

class cTest {
public:
	int Method() {}

};

void Func()
{
	cTest* pObject;
	pObject -> Method();
}


Can you please try if you can reproduce the problem in a clean new test project using the above code? I am wondering if is this something project specific or caused by a setting or whether we do exactly same thing when typing or not.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000