| Author |  Topic  |  | 
              
                | ajtruckleKetchup Master
 
     
 
                81 Posts | 
                    
                      |  Posted - Apr 07 2005 :  03:00:03 AM   
 |  
                      | 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
 |  | 
              
                | SvenCTomato Guru
 
      
 
                Germany339 Posts
 | 
                    
                      |  Posted - Apr 07 2005 :  03:51:10 AM   
 |  
                      | 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
  |  
                      |  |  | 
              
                | jpizziTomato Guru
 
      
 
                USA642 Posts
 |  | 
              
                | supportWhole Tomato Software
 
      
 
                5566 Posts |  | 
              
                | ajtruckleKetchup Master
 
     
 
                81 Posts | 
                    
                      |  Posted - Apr 08 2005 :  4:44:30 PM   
 |  
                      | Thank you, I will look. 
 Andrew
 |  
                      |  |  | 
              
                | WannabeeDeveloperTomato Guru
 
      
 
                Germany775 Posts
 | 
                    
                      |  Posted - Apr 09 2005 :  02:20:45 AM   
 |  
                      | 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.
 |  
                      | 
  |  
                      |  |  | 
              
                | ajtruckleKetchup Master
 
     
 
                81 Posts | 
                    
                      |  Posted - Apr 09 2005 :  08:03:20 AM   
 |  
                      | 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
 |  
                      |  |  | 
              
                | WannabeeDeveloperTomato Guru
 
      
 
                Germany775 Posts
 | 
                    
                      |  Posted - Apr 09 2005 :  08:42:14 AM   
 |  
                      | That's found in the Options of VAX: Text Editor -> Correction -> Insert () and closing })] and put X spaces between methodname and ()
 |  
                      | 
  |  
                      |  |  | 
              
                | ajtruckleKetchup Master
 
     
 
                81 Posts | 
                    
                      |  Posted - Apr 10 2005 :  04:21:07 AM   
 |  
                      | 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....?
 |  
                      |  |  | 
              
                | WannabeeDeveloperTomato Guru
 
      
 
                Germany775 Posts
 | 
                    
                      |  Posted - Apr 10 2005 :  05:36:22 AM   
 |  
                      | 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.
 |  
                      | 
  |  
                      |  |  | 
              
                |  |  Topic  |  |