Replacement Tokens - Multiple replacement

Requests new features for future versions.

Moderator: TopStyle Support

Replacement Tokens - Multiple replacement

Postby KBeng » Tue May 29, 2012 4:59 am

It would be useful if all appearances of a variable with the same name could be replaced while entering the value only once.

Example for the attributes name and id beeing identical:

Code: Select all
<input type="text" name="%r[id]" id="%r[id]" />
KBeng
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 8
Joined: Tue May 29, 2012 4:42 am

Re: Replacement Tokens - Multiple replacement

Postby KBeng » Wed Aug 22, 2012 1:22 pm

Same goes for the new Auto-Replace feature.
KBeng
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 8
Joined: Tue May 29, 2012 4:42 am

Re: Replacement Tokens - Multiple replacement

Postby TopStyle Support » Fri Aug 24, 2012 3:21 am

The new Auto-Replace features does support this. Please take a look at this snippet:

Code: Select all
<input type="text" name="${1:hello}" id="$1" />


In this example, TopStyle 5 will prompt for a variable named "hello" only once, and then replace all appearances of it in your snippet.
User avatar
TopStyle Support
Rank VI - Professional
Rank VI - Professional
 
Posts: 404
Joined: Sat Jun 13, 2009 12:38 pm

Re: Replacement Tokens - Multiple replacement

Postby KBeng » Wed Aug 29, 2012 9:20 am

Perfect. Thank you! :)
KBeng
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 8
Joined: Tue May 29, 2012 4:42 am


Return to TopStyle Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest