Another idea

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Another idea

Postby BladeMF » November 11th, 2013, 4:03 pm

It would be great to support 'Surround with...' snippets. Right now it shows empty list and then 'Object reference not set...'.
Welcome to the zone where normal things don't happen very often.
BladeMF
 
Posts: 346
Joined: October 10th, 2012, 7:14 am

Re: Another idea

Postby Jakub Misek » November 11th, 2013, 9:18 pm

Hi, Thanks, this seems to be a bug in VS CodeSnippets manager.

Just delete following registry key
Code: Select all
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\Languages\CodeExpansions\PHP


substitute 11.0 with 12.0 or 10.0 ...

VS somehow caches old path to snippets, and after updating to newer version of the extension, it does not update this value ...
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Another idea

Postby BladeMF » November 11th, 2013, 9:36 pm

Actually the Path inside was incorrect (again the old generated path fivrlypx.tmo). I changed it. Does this mean that I can have 'surround with' now?
Welcome to the zone where normal things don't happen very often.
BladeMF
 
Posts: 346
Joined: October 10th, 2012, 7:14 am

Re: Another idea

Postby Jakub Misek » November 11th, 2013, 9:43 pm

The key can be deleted, VS creates new one correctly.

Surround With and Insert Snippet works (with valid registry key).
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Another idea

Postby BladeMF » November 11th, 2013, 9:54 pm

Okay, it works. I added a #region snippet, but after Ctrl+K,S I get a list of folders, which is somewhat inconvenient. Can both folders be merged? Like in c#?
Welcome to the zone where normal things don't happen very often.
BladeMF
 
Posts: 346
Joined: October 10th, 2012, 7:14 am

Re: Another idea

Postby Jakub Misek » November 11th, 2013, 9:59 pm

You should get list of snippets, no folders. If you get folders, your custom snippets have different category maybe. You should be able to manage all the snippets in Tools | Code Snippets Manager.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Another idea

Postby BladeMF » November 11th, 2013, 10:07 pm

My snippet is here: D:\Documents\Visual Studio 2012\Code Snippets\Phalanger\My Code Snippets. Which folder should I use? I copied one of your snippets and changed it.
Welcome to the zone where normal things don't happen very often.
BladeMF
 
Posts: 346
Joined: October 10th, 2012, 7:14 am

Re: Another idea

Postby BladeMF » November 11th, 2013, 10:10 pm

Tried moving it to "PHP" instead of "Phalanger". No joy.
Welcome to the zone where normal things don't happen very often.
BladeMF
 
Posts: 346
Joined: October 10th, 2012, 7:14 am

Re: Another idea

Postby Jakub Misek » November 11th, 2013, 11:42 pm

This is VS thing; I'm using Code Snippets Manager and Import snippet button.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Another idea

Postby BladeMF » November 12th, 2013, 6:33 am

You choose just the snippet, not the folder, right?
Welcome to the zone where normal things don't happen very often.
BladeMF
 
Posts: 346
Joined: October 10th, 2012, 7:14 am

Next

Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 37 guests

User Control Panel

Login

Who is online

In total there are 37 users online :: 0 registered, 0 hidden and 37 guests (based on users active over the past 5 minutes)
Most users ever online was 511 on April 27th, 2024, 10:11 pm

Users browsing this forum: No registered users and 37 guests