Intellisense with Code Snippets

Is the below behavior a bug or just a missing feature? Is there a way to get around it or can it be implemented?

With Visual Studio intellisense I can type the first few letters of a code snippet shortcut then hit Ctrl+Space (C#) and I'll get a list of my snippets. When Resharper intellisense is enabled, I don't get the list of my custom snippets this way. This forces me to almost not use code snippets or to give up resharper intellisense, neither of which are preferable. I know I can type the exact shortcut name and hit tab twice or get to "Insert Snippet" other ways but this way is most convenient.

10 comments
Comment actions Permalink

Resharper imports all of the VS snippets into it's Live Templates. You should see them in normal intellisense lists, they're identified with orange boxes by default. Just hit tab to expand.
To force a listing of the Live Templates use Ctrl+E, L

For Surround With... use Ctrl+E, U

I work with this open on my desktop all the time: http://www.jetbrains.com/resharper/docs/ReSharper50DefaultKeymap_VS_scheme.pdf

0
Comment actions Permalink

Yeah I see the "generic" / "vanilla" VS snippets in Resharper intellisense such as "foreach" with the orange squares.

I do not however, see my own custom snippets I manually added via the visual studio code snippet manager.

See my screencast: http://dl.dropbox.com/u/235508/ResharperCodeSnippets.avi

0
Comment actions Permalink

Hello Geoff,

Due to technical difficulties ReSharper cannot show Visual Studio snippets
in IntelliSense. As a workaround you can either:

1. Switch to built-in Visual Studio IntelliSense under ReSharper > Options

IntelliSense > General

2. Create custom Live Templates (ReSharper > Live Templates) similar to your
snippets and use them instead
3. Use Edit > IntelliSense > Insert Snippet... (or the corresponding shortcut)

Thank you!

Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Yeah I see the "generic" / "vanilla" VS snippets in Resharper
intellisense such as "foreach" with the orange squares.

I do not however, see my own custom snippets I manually added via the
visual studio code snippet manager.

See my screencast:
http://dl.dropbox.com/u/235508/ResharperCodeSnippets.avi

---
Original message URL:
http://www.jetbrains.net/devnet/message/5265250#5265250



0
Comment actions Permalink

D'you deem it fixable? Because I'm missing a few vanilla snippets such as propfull, too.

0
Comment actions Permalink

Actually, snippets such as propfull, propdp, propa, are not visible in R# intellisense, but typing them and pressing tab still works on them.

0
Comment actions Permalink

Indeed, that's what I do. However the whole purpose of Intellisense and Auto Completion is to *not* know the exact phrasing of a statement. Therefore not showing the complete list of statements I definitivly consider a bug. Either do the stuff right or leave it be altogether. Anything else is half-hearted...

0
Comment actions Permalink

Hello,

I'm afraid there's no way we can fix this problem at the moment. As I've
mentioned, you can create similar live templates which will be visible in
ReSharper's IntelliSense. Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Indeed, that's what I do. However the whole purpose of Intellisense
and Auto Completion is to not know the exact phrasing of a
statement. Therefore not showing the complete list of statements I
definitivly consider a bug. Either do the stuff right or leave it be
altogether. Anything else is half-hearted...

---
Original message URL:
http://devnet.jetbrains.net/message/5317682#5317682



0
Comment actions Permalink

I wonder if my Resharper installation had an import problem.
I see the orange box for the snippet that I want, but pressing Tab results in nothing (or in the case of a SurroundWith template, it deletes the bit that was selected!).
In Template Explorer some of these are marked as Imported Visual Studio C#, but they are empty while the actual VS snippet file is still there.

I was using VS2008 with R# 6.1 and it worked fine, but then I upgraded to VS2010 and now most of my code snippets are no longer available through R#.
Can it be fixed?

0
Comment actions Permalink

Hello Gordon
     Does this happen with any live template or only with those imported VS snippets? Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Andrey,

It's somewhat unclear (partly because I've filled in some of the snippets in Resharper that I use often).

I'm in C# primarily. Most of the ones I've noticed have been marked either as "Iteration" or as "Imported Visual C# Snippets". Most of the rest show code in the bottom pane of the Template Explorer. The ones I've found that don't (or didn't before I filled them in) were:
checked
do
if
invoke
for
forr
foreach
lock
try
tryf
switch
unchecked
using
while

Surprisingly, the ones marked Iteration that start with 'it' work fine ("ital", "itar", etc.).
Gordon

0

Please sign in to leave a comment.