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
 Changing the format of the way the text is created
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

ajtruckle
Ketchup Master

81 Posts

Posted - Apr 07 2005 :  03:00:03 AM  Show Profile
At the moment, when I do things like:

if(xxxx)
{
}

etc..

I would prefer:

if( xxxx )
{
}

I like a space after the ( and before the ). Can that be changed?

I have only just started using the trial version.

Andrew

SvenC
Tomato Guru

Germany
339 Posts

Posted - Apr 07 2005 :  03:51:10 AM  Show Profile
If you are talking about the autotext option then open the VAX options dialog. Choose AutoText/Templates. Choose your language, e.g. C/C++. You'll find a line if: Followed by the text to automatically enter when that autotext entry is accepted. Change "if (-?)" to "if( -? )" and you should be fine.

If you speak of general reformatting of your source: that is a job VS.NET is doing not VAX and I don't know of a way that VS.Net would do the above. Its comming for C# in VS2005 but I think it is not there for C/C++, yet.
You might try to do this with macros but that could get a challenging task
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Apr 08 2005 :  12:36:00 AM  Show Profile
If you are not talking about the AutoText/Templates, then you might want to try GC.
http://sourceforge.net/projects/gcgreatcode/

Joe Pizzi
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Apr 08 2005 :  1:20:50 PM  Show Profile
We suspect a change in Autotext is all that is necessary, as Sven suggested.

http://www.wholetomato.com/products/features/autotext.html?more=yes
Go to Top of Page

ajtruckle
Ketchup Master

81 Posts

Posted - Apr 08 2005 :  4:44:30 PM  Show Profile
Thank you, I will look.

Andrew
Go to Top of Page

WannabeeDeveloper
Tomato Guru

Germany
775 Posts

Posted - Apr 09 2005 :  02:20:45 AM  Show Profile
The Autotext-Feature of Visual Assist X is extremely strong... you can achieve almost everything with it.

You may find some guidance/ideas about the Autotext-Feature in this Thread.

Go to Top of Page

ajtruckle
Ketchup Master

81 Posts

Posted - Apr 09 2005 :  08:03:20 AM  Show Profile
I got it working. My next question is when I am typing a function name and it adds the () at the end of the function. If it has parameters, I want the space after and before the brackets too.

I am not sure which entries to adjust for that.

Andrew
Go to Top of Page

WannabeeDeveloper
Tomato Guru

Germany
775 Posts

Posted - Apr 09 2005 :  08:42:14 AM  Show Profile
That's found in the Options of VAX:
Text Editor -> Correction -> Insert () and closing })] and put X spaces between methodname and ()

Go to Top of Page

ajtruckle
Ketchup Master

81 Posts

Posted - Apr 10 2005 :  04:21:07 AM  Show Profile
Unless I missunderstand that option setting, I am not sure if it is what I am referring to.

If I have a method that takes one parameter, at the moment it would end up as:

Method(parameter)

But I would like:

Method( parameter )

It seems your option would do:

Method (parameter)

It is not a hardship, but I am just curious because I can set these things for if, while etc..

Side question, how do I copy these settings to my other PC? Do I copy my cpp.tpl file....?
Go to Top of Page

WannabeeDeveloper
Tomato Guru

Germany
775 Posts

Posted - Apr 10 2005 :  05:36:22 AM  Show Profile
Your assumption about the Option is right.
You have to distinguish between Autotext and Completion.

That Option-setting refers to the Suggestion/Completion of Method-Names and automatically adding brackets to it...

Autotext has precedence over any other suggestion listbox.
Because you have an entry for "if" in the Autotext-template by default, you get an Autotext-Listbox when typing "if".
Since it is an Autotext, you can edit your Autotext-entry (like "if ( -? ) {\\n\\n}", for example).

However, if you add an entry to the Autotext-Templatefile, like
"Method ( -? )" or something like that, you will get the text you want, because as stated in the Manual, "Autotext has precedence over any other suggestion listbox."... So whenever there is an autotext-entry for what you just type, you will get that entry shown. Ctrl + Space then opens a completion listbox.
I do not know if you get parameter listing when doing so...

There are no entries for Method-Names, cause they come from a completion-listbox.
You may persuade the dev-team to alter the option a bit (to let you have the space between bracket and first parameter), but I don't think they'll implement that... but I can also be wrong on that one.


In order to get "your" Autotext-templates to antoher PC, simply copy all files from \\Visual Assist X\\Templates into the same folder on the destination pc.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000