3

Is there a way to insert a concrete snippet (say, MySnippet1) with a single shortcut or toolbar command in Visual Studio 2010?

I've tried macro recorder - it doesn't allow inserting snippets during recording.

Regards,

2
  • This would be very helpful because when you get so many snippets of your own made, you lose track of those arcane "shortcuts" and would prefer to have them all on a toolbar with a tool tip so you can remember they are there and what they are. Commented Sep 2, 2014 at 20:18
  • I had to print out a screen shot of my snippets folder and tape it to my monitor lol. Commented Sep 2, 2014 at 20:27

1 Answer 1

1

If you go to 'Code Snippet Manager' short cut => Ctrl + K, Ctrl + B. You will see that all snippets have a direct shortcut associated with them. I would guess that if you were to add your own snippet you will get an option of linking a direct short cut to it.

HTH.

Cheers, Tarun

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, but they are not "shortcuts" in common sense of the word. Just short names you have to enter (and press Tab) to insert the snippet. For instance, my log snippet name is "log" and Code Snippet Manager dialog shows the snippet has "log" shortcut. What I want is a way to associate log snippet with a, say, Ctrl+L as I don't use Ctrl+L anyway. Actually, there was a Good "Commands" Concept: every user activity is a "command", that can be presented as either toolbar button or menu row, has its own image, name and title and (!) has its keyboard shortcut. Too bad the concept's gone now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.