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
 Possible to format func(param) diff than func()
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cpr2323
New Member

3 Posts

Posted - Mar 09 2018 :  1:42:56 PM  Show Profile  Reply with Quote
The coding style guide I am currently working with (on a contract) requires formatting where there is a space between function names and the open paren IF there are parameters, but no space before the paren if there are not parameters.

func1 (param)
and
func2()

Can I configure VA to do this?

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Mar 09 2018 :  2:45:39 PM  Show Profile  Reply with Quote
Unfortunately no, since VA does not really do code formatting. The IDE has some code formatting options, which have been expanded in VS2017. Otherwise, if you want this done automatically, you are going to need to look up a code formatting tool.

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

cpr2323
New Member

3 Posts

Posted - Mar 09 2018 :  8:45:57 PM  Show Profile  Reply with Quote
Hmm.. I guess I'm slightly confused, since VA gave me to option to insert a space in between function name and the paren, which is code formatting. This puts me in the reverse situation I was in without VA, ie. not having a space. So, now I'm deleting a space for the no param version, instead of inserting it for the with param version. I thought there might be some config file with some sort of pattern matching that defined all these rules. Thank for the info.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Mar 10 2018 :  05:46:26 AM  Show Profile  Reply with Quote
VA offers you some control over the formatting of the code we insert / generate for you. For example, there are VA Snippets to control the formatting of the code generated by refactoring commands and the comments inserted via Document Method. The setting you are talking about here is:

VA Options -> Editor -> Insert () and closing } ) ] ' "
and put X spaces between method name and ()

but we don't attempt to offer "full" code formatting control. The problem with doing this is the number of different settings it requires, since it seems that everyone who wants code formatted has a slightly different set of requirements.

I don't ever recall coming across this formatting rule before, and no, unfortunately VA does not offer this level of control over the spaces. I don't think VS2017 does either.

zen is the art of being at one with the two'ness
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