looking for how to support XQuery in ZendCoding, is there any guide for this?

28 views
Skip to first unread message

Deitek Systems

unread,
Jul 29, 2012, 3:03:36 PM7/29/12
to zen-c...@googlegroups.com
Hi


I'm looking for how to support XQuery in ZendCoding, is there any guide for this?

I've tried using the following syntax in the zend_coding.js File of notepad++, 

[Code]

'xqy': {
'filters': 'xqy',
'snippets': {
'nsosm2': 'declare namespace;'
},
'abbreviations': {
'nsosm': 'declare namespace osm;'
}
},

[Code] 

but I could not get what I need.


Someone could give me some help?


Regards,


David Alejandro Leon H
Deitek Systems

Sergey Chikuyonok

unread,
Jul 29, 2012, 3:08:28 PM7/29/12
to zen-c...@googlegroups.com
1. There's no 'xqy' filter, you shouldn't define it in 'filters' section. Better remove 'filters' at all.
2. You should also modify getSyntax() method so it can correctly match syntax for required files.

___________________________________________
Сергей Чикуёнок

Deitek Systems

unread,
Jul 29, 2012, 11:23:03 PM7/29/12
to zen-c...@googlegroups.com
Hi Serge

I'm trying removing the filter section as follows:

[Code]
'xqy': {
'snippets': {
'nsosm2': 'declare namespace;'
},
'abbreviations': {
'nsosm': 'declare namespace osm;'
}
},
[Code] 

But when I want in notepad using Ctrl+E after I write the abbreviation as follows:

nsosm

I can not get the expected output: declare namespace osm

but this expands the abbreviation as follows:

<nsosm> </ nsosm>

How could obtain the expected output achieved ?


Regards,

David A Leon H
Deitek Systems

Sergey Chikuyonok

unread,
Jul 30, 2012, 7:32:29 AM7/30/12
to zen-c...@googlegroups.com
[As a follow-up: try to use v0.8 plugin: https://github.com/sergeche/zen-coding/downloads]


As is said, you have to modify getSyntax() method of editor proxy: https://github.com/sergeche/zen-coding/blob/v0.7.1/plugins/npp/editor.js#L91 (it’s a source code, the plugin has all files concatenated into single file).
You need to make sure that real syntax name used by N++ is xqy, not query or something else. Otherwise, you need to change syntax name in Zen Coding snippets.

Or you can just add your snippets to html syntax. 

___________________________________________
Сергей Чикуёнок
http://chikuyonok.ru
serg...@gmail.com

Deitek Systems

unread,
Jul 30, 2012, 10:49:39 AM7/30/12
to zen-c...@googlegroups.com
Hi Serge

I tested several modifications to the file snippets.json (Zendcoding v0.8Beta-Npp), the only thing that I worked, was to add xquery snippets within the group of snippets of html

Now I haven't tried to modify the method getSyntax (),

Thanks for the help,

regards,


David A Leon H
Deitek systems
Reply all
Reply to author
Forward
0 new messages