Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Possible to format func(param) diff than func()

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
cpr2323 Posted - Mar 09 2018 : 1:42:56 PM
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?
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Mar 10 2018 : 05:46:26 AM
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.
cpr2323 Posted - Mar 09 2018 : 8:45:57 PM
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.
feline Posted - Mar 09 2018 : 2:45:39 PM
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.

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