Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Repeat snippet when $selected$ on multiple lines

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
jadriano Posted - Mar 17 2010 : 10:12:45 AM
Given the follwing macro VA Snippet

void Enter$selected$();
void Update$selected$();
void Exit$selected$();$end$


And the following selection

StateA
StateB


is it possible to generate, in one shot:

void EnteStateA();
void UpdateStateA();
void ExitStateA();
void EnterStateB();
void UpdateStateB();
void ExitStateB();


Regards,

*moved to correct section by feline*
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Mar 18 2010 : 2:40:59 PM
If you are selecting more than one line, then no. Since VA Snippets are designed to treat a multi-line selection as a single block of text.

You could edit the snippet to use $clipboard$ for one block and $selected$ for the second block, this will do what you want, so the snippet becomes:

void Enter$clipboard$();
void Update$clipboard$();
void Exit$clipboard$();
void Enter$selected$();
void Update$selected$();
void Exit$selected$();$end$

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