Author |
Topic |
|
mnicolella
Junior Member
14 Posts |
Posted - Aug 22 2013 : 5:17:45 PM
|
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
|
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 |
|
|
mnicolella
Junior Member
14 Posts |
Posted - Aug 26 2013 : 1:11:26 PM
|
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 |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Aug 26 2013 : 3:24:50 PM
|
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 |
|
|
mnicolella
Junior Member
14 Posts |
Posted - Aug 26 2013 : 3:34:11 PM
|
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 |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Aug 26 2013 : 7:52:38 PM
|
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 |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Sep 23 2013 : 11:57:19 AM
|
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 |
|
|
|
Topic |
|