Home Download Buy Blog Forum Support

snippets fail with special characters

snippets fail with special characters

Postby bjan on Sat Mar 17, 2012 11:12 pm

Is there a trick to enable snippets to work with special characters?
i.e. I tried to set up an HTML basic framework, which failed in the beginning. It just erases the typed tab trigger.
I found out that it was a simple paragraph showing some special characters.
So also a jquery snippet is not possible supposedly for the same reason.

Is there a trick, is this a bug or is this intended to be like this?

Thanks for any hints.
bjan
 
Posts: 1
Joined: Sat Mar 17, 2012 10:48 pm

Re: snippets fail with special characters

Postby agibsonsw on Sat Mar 17, 2012 11:24 pm

Not sure of the exact issue, but the following file setting enables auto complete and snippets to be triggered by a non-alphabetic character:

Code: Select all
// Additional situations to trigger auto complete
"auto_complete_triggers": [ {"selector": "text.html", "characters": "<"} ],


Depending on how you are creating a snippet, some characters need to be double, or single, escaped: \\"

Dollar signs and apostrophes in particular can be troublesome. Sometimes you may need to use a hex code: \x27
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: snippets fail with special characters

Postby jps on Sun Mar 18, 2012 2:23 am

Please give a concrete example of the snippet you're using
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: snippets fail with special characters

Postby groomedmonkey on Fri Apr 13, 2012 12:43 pm

I am trying to make a snippet that contains $_SERVER['DOCUMENT_ROOT'] but when it pastes it removes the $_SERVER and inserts:

['DOCUMENT_ROOT']
groomedmonkey
 
Posts: 1
Joined: Fri Apr 13, 2012 12:39 pm

Re: snippets fail with special characters

Postby C0D312 on Fri Apr 13, 2012 1:03 pm

\$
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am


Return to Technical Support

Who is online

Users browsing this forum: Orlmente, Yahoo [Bot] and 30 guests