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
 Feature Requests
 match partial snippet shortcut
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mnicolella
Junior Member

14 Posts

Posted - Aug 22 2013 :  5:17:45 PM  Show Profile  Reply with Quote
I have two snippets
"dsfe" and "dsfef"

when I type "dsf" I'd like the suggestion listbox to include both of these snippet suggestions. Currently it only suggests a snippet if I type the entire snippet shortcut exactly

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Aug 23 2013 :  10:20:36 PM  Show Profile  Reply with Quote
Why do you want the snippet suggestions to turn up before you have finished typing the shortcut?

Are you aware you can have have more than one snippet with the same shortcut, so you could have both shortcuts with the shortcut "dsfe" if you wanted, so both would appear in the listbox together, letting you select the one you want without typing any more characters.

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

mnicolella
Junior Member

14 Posts

Posted - Aug 26 2013 :  1:11:26 PM  Show Profile  Reply with Quote
Well, the suggestions show me other things that 'partially match' what I'm typing, it seems the shortcuts are explicitly excluded for some reason.

I didn't realize I could have more than one, but if I prefix a class of shortcuts with the same prefix, with this change I would get the listbox with all of the shortcuts that start with the prefix - then as people learn the specific suffixes for the things they want, they can quickly type it and avoid needing to always switch to arrow keys to get what they want
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Aug 26 2013 :  3:24:50 PM  Show Profile  Reply with Quote
If you have a lot of snippets, which is common, especially since VA ships with quite a few by default, you don't want all of these always appearing in the listboxes, getting in the way when you are typing something different. Plus the snippets are designed to take focus when you type the full snippet shortcut, so you can quickly and reliably enter the snippet. So we have to balance this with helping you type other things.

You could try adding a snippet with the shortcut "dsf", and have this insert the most common expansion, and then have "dsfe" and "dsfef" as more precise and specific snippets.

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

mnicolella
Junior Member

14 Posts

Posted - Aug 26 2013 :  3:34:11 PM  Show Profile  Reply with Quote
I hardly use any of the builtin VAX snippets, pretty much the only snippets I use are the ones I define. If including the snippets with a partial match were an option I could turn on, that would be great
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Aug 26 2013 :  7:52:38 PM  Show Profile  Reply with Quote
This makes sense, and I see what you are trying to achieve here. I have put in a feature request for this, I can see how this will work for snippets with longer shortcuts:

case=76428

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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 23 2013 :  11:57:19 AM  Show Profile  Reply with Quote
Build 2001 has a hidden option that enables a step in the direction of this request.

After you start and exit Visual Studio with VA build 2001, a new registry value named PartialSnippetShortcutMatches will be created. It is off by default. Change the 00 value to 01 to enable the following new behavior:

Once an actual snippet shortcut has been typed, other snippets will also be added to the list if their shortcut begins with what has been typed. In the examples above, if there is a snippet whose shortcut is 'dsf', then once dsf has been typed, all snippets whose shortcuts start with dsf will also be displayed (dsf, dsfe, dsfef).

Edited by - sean on Sep 23 2013 11:58:06 AM
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