Author |
Topic |
|
rberton
New Member
5 Posts |
Posted - Jan 03 2008 : 5:30:27 PM
|
I am currently evaluating VAX for possible usage and I have specifically sought it out for the AutoText (VA Snippet) feature.
My question/suggestion is:
Given this:
if<space>
Which expands to:
if (<cursor>)
{
;
}
What I want to be able to do, is enter the expression where the <cursor> is and hit Enter or Tab and go to the semi-colon.
This does not appear possible with the current version ( 10.4), unless I am missing something. What happens is this:
if ( expression
)
{
;
}
or:
if ( expression )
{
;
}
Then I have to delete chars or move the cursor to the right spot. Doesn't save any time.
Is there a way to accomplish what I want in the existing version?
Thanks,
riley |
|
rhummer
Tomato Guru
USA
527 Posts |
Posted - Jan 03 2008 : 6:05:05 PM
|
You could add another VA Snippet for the 'if' statement, or which ever statement you desire, that requires an expression, and places the cursor where you choose. Like so:
if ( $expression$ )
{
$end$
}
|
Tools Engineer - Raven Software VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64
|
|
|
rberton
New Member
5 Posts |
Posted - Jan 03 2008 : 11:04:16 PM
|
Yes, that does technically work but it is less than ideal. That merely pops up a dialog to complete $expression$. The dialog does not benefit from any of the IntelliAssist, or VA Snippet completions so you are left to type it all out.
It would be easier if either, the popup dialog allowed IntelliAssist/Snippets or if there was no dialog and you could add the $expression$ portion directly in the code editor.
riley |
|
|
rhummer
Tomato Guru
USA
527 Posts |
Posted - Jan 04 2008 : 10:52:36 AM
|
That's currently the only option you have. Other than you could type the expression in the IDE first, with full Intellisence support, cut that text, then paste it as the expression parameter.
I can't recall if it has been requested to have Intellisence in the VA Snippets window or not, I'll let feline answer that. :) |
Tools Engineer - Raven Software VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64
|
|
|
rberton
New Member
5 Posts |
Posted - Jan 04 2008 : 10:58:00 AM
|
Ideally, no window pops up. Twould be better if VAX could complete user defined variables in place instead of popping up a window. Then we could create arbitrarily complex snippets and have the cursor jump to the correct place.
The TAB key would complete a variable and move to the next one eventually stopping at $end$.
riley |
|
|
feline
Whole Tomato Software
United Kingdom
18943 Posts |
Posted - Jan 04 2008 : 3:40:13 PM
|
You could enter the expression first, then select it and trigger the VA Snippet:
if ( $selected$ )
{
$end$;
}
Which will wrap the selected code in the "if" condition. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|