T O P I C R E V I E W |
TheNotebook |
Posted - Dec 28 2015 : 3:15:37 PM Hi,
it would be nice, to have the possibility to input text in a textbox to trigger a search for the snippet one want to use. Just like the Windows start menu since Vista works.
advantages: - huges menus will get comparably small - no need for the eyes to search - no need to use the mouse to select one of hundreds of entries - let the computer do, what the computer can do best :)
regards |
8 L A T E S T R E P L I E S (Newest First) |
TheNotebook |
Posted - Jan 16 2016 : 07:42:38 AM oh, that's very nice! thank you for that! :) (y) |
accord |
Posted - Jan 12 2016 : 5:33:02 PM I have put in a feature request for a filterable list for "surround with" snippets:
case=94379 |
TheNotebook |
Posted - Jan 12 2016 : 4:28:11 PM that's not a solution, but indeed a usable workaround. Thank you for that advice! |
accord |
Posted - Jan 06 2016 : 3:00:13 PM *ah* Yes, makes sense
First of all, I have question though: are you aware that you can use shortcuts for snippets?
quote: Basically something, that would make it possible for me to use the self-created macros for selected text. ("self-created", as #ifdef works, for example)
For #ifdef, if you press '#' key, it will trigger the snippet if you have a selection. But you can use "self-created" snippets as well and still use a shortcut as it is shown on the below screenshot.
For example if you put 'f' there you just press 'f' while there is a selection to trigger the snippet. If you've more than one snippet with the shortcut 'f' you will get a list of the snippets with the shortcut 'f'. It's not the same as filtering but I can see how you can use this to easily and quickly access a lot of snippets. |
TheNotebook |
Posted - Jan 05 2016 : 5:25:15 PM Holidays are over :)
This is pretty good and helpful. Thank you for that advice! But as I figured, this will not help for surrounding blocks. For example I have a snippet, that simply creates a namespace. And another one, that creates a specified "namespace Unittests". I can't use them for selected text, by just typing in the editor. It only works, if I open the big "insert-snippet"-context menu and select it from there.
quote: So I assume you are after something slightly different?
Indeed. Basically something, that would make it possible for me to use the self-created macros for selected text. ("self-created", as #ifdef works, for example)
What I was describing in my previous posts was simply a misleading by the big context-menu. I still think, that a text-search field in that menu would be a good choice, as it became natural to type, what you want, if you have a lot of content. But having the possibility of using any snippet for selected text, will do everything I need :)
@bug: Sorry for being unspecific. Windows 7 64 bit VA version 10.9.2076.0 built 2015.09.15 Trial License Visual Studio 2012 Update 5 Shortcut: Ctrl+Alt+E (but same issue appears, if I use the Icon-bar --> insert VA Snippet --> Edit Snippets)
regards |
feline |
Posted - Dec 29 2015 : 3:00:50 PM My first answer is that you search for a Snippet by typing its shortcut in the editor, and then accepting it when it is suggested. There is a setting to help make this easier, if you have several snippets that start with the same few characters in their shortcuts:
https://wholetomato.fogbugz.com/default.asp?W325
The thinking is that the shortcuts will be related to what you are doing, "class" entering a class body, "t" entering "true", "if" entering an if statement block, and so on.
Some of the snippet's won't be so easily discovered like this, but they are listed in the dialog.
What are you looking for hear? Help discovering existing snippets? Remembering the shortcuts for a given snippet? I use snippets when I know what I want to enter, and try to make the shortcut match the name of what I am entering, so they will naturally be suggested as I am typing. So I assume you are after something slightly different?
As for the bug, which OS, IDE and version of VA are you using? What keyboard shortcut are you using, and which command is it mapped to? I have mapped Ctrl+# to VAssistX.VaSnippetInsert, and when I select "Edit VA Snippets..." from the bottom of the menu, the dialog is always the same size. Testing Windows 7, VS2013 and VA 2086. |
TheNotebook |
Posted - Dec 29 2015 : 2:45:51 PM Thank you for the suggestion. As far as I can see that's a: - *open dialog - navigate to type - choose "search" - navigate to the search text box - *type the string to search - navigate to list results - *select item to use
( * would be necessary in my suggestion as well ) As you can see, there a lot of actions necessary, that could be streamlined.
I btw. found a bug? Openning the Snippet editor through a shortcut always reduces the window size related to the window size, when it was closed the last time...
regards
|
accord |
Posted - Dec 28 2015 : 9:05:31 PM You can search snippets by switching the type to "search".
|
|
|