Author |
Topic  |
|
ontherocks
Junior Member
 
13 Posts |
Posted - Nov 24 2014 : 01:48:54 AM
|
I want to create a VA snippet for a language other than C++/C#/XAML. The "VA Snippet Editor" has options for "Language", only for C++, C# and XAML. How do I go about it?

|
|
accord
Whole Tomato Software
    
United Kingdom
3287 Posts |
|
ontherocks
Junior Member
 
13 Posts |
Posted - Nov 26 2014 : 07:03:24 AM
|
Ok. This enabled additional other predefined languages (Html, JavaScript, Text, VB) . The one which I am looking for is not in this list. Can I add something other than these? Or would it fall under "Text"? |
Edited by - ontherocks on Nov 26 2014 07:27:05 AM |
 |
|
accord
Whole Tomato Software
    
United Kingdom
3287 Posts |
Posted - Nov 26 2014 : 2:37:35 PM
|
You cannot add new languages, but I think you can try this one: http://docs.wholetomato.com/default.asp?W353
So you can add additional extensions for a language. You just need to select one that you don't do programming in. |
Edited by - accord on Nov 26 2014 2:39:05 PM |
 |
|
ontherocks
Junior Member
 
13 Posts |
Posted - Nov 26 2014 : 11:34:58 PM
|
I tried adding my file extension to a language that I do not use (ExtXaml). However, the keyboard shortcuts that I specify, do not work. I have to click the Toolbar button "Insert VA Snippet" then click "VA Snippets with shortcuts" to insert the snippet. |
Edited by - ontherocks on Nov 26 2014 11:44:52 PM |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19136 Posts |
Posted - Nov 27 2014 : 3:50:49 PM
|
What file extension are you working in, and which language have you mapped it to?
Which IDE and version of VA are you using? |
zen is the art of being at one with the two'ness |
 |
|
ontherocks
Junior Member
 
13 Posts |
Posted - Nov 28 2014 : 05:38:11 AM
|
File extension - .sch (Proprietary) Mapped in registry to - "XAML" (ExtXaml) [tried with "Text" (ExtPlainText) too] IDE - VS2012
VA and some more details:
VA_X.dll file version 10.9.2052.0 built 2014.11.05 DevEnv.exe version 11.0.51106.1 Professional msenv.dll version 11.0.51106.1 Comctl32.dll version 6.10.7601.17514 Windows 7 6.1 Build 7601 Service Pack 1 8 processors (x86-64, WOW64) Language info: 1252, 0x409 |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19136 Posts |
Posted - Nov 29 2014 : 01:39:44 AM
|
Are you getting the VA context and definition fields at the top of the editor in the .sch files?
This is working correctly for me, and I am seeing these fields in the editor after setting the registry key and loading VS2012.
In the IDE options dialog, keyboard mappings section, which scope have you used for the command VAssistX.VaSnippetInsert ? I have this mapped to Ctrl+# in the Text Editor. |
zen is the art of being at one with the two'ness |
 |
|
ontherocks
Junior Member
 
13 Posts |
Posted - Dec 02 2014 : 12:08:27 AM
|
Not sure which "fields" are you talking about.
There is no keyboard shortcut mapped in Text Editor for VAssistX.VaSnippetInsert

I was talking about the keyboard shortcut that I define in "VA Snippet Editor". These do not work in my file.

So, for example if it was a .cpp file, I would just type "/com" in some line and the "Add Comment" snippet would appear and then I would hit TAB or ENTER to insert the snippet. However, in my file if I type "/com" the snippet does not appear. With the cursor at that line I would like to insert the "Add Comment" Snippet, I have to I have to click the Toolbar button "Insert VA Snippet" then click "VA Snippets with shortcuts" to insert the "Add Comment" snippet. |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19136 Posts |
Posted - Dec 02 2014 : 11:44:14 PM
|
Sorry, I misunderstood what was going wrong here. I see what you are doing now. Can you please try turning On:
VA Options -> Listboxes -> Enable Visual Assist completion, suggestion and member listboxes in C#
this should fix the problem for you, and snippets should now be suggested and work as expected in your sch files. |
zen is the art of being at one with the two'ness |
 |
|
ontherocks
Junior Member
 
13 Posts |
Posted - Dec 19 2014 : 02:50:01 AM
|
That worked! :) Thanks. |
 |
|
tgaldi
New Member

2 Posts |
Posted - Jun 23 2017 : 09:37:03 AM
|
Hi,
I'm trying to use snippets for F#.
I've added .fs .fsx to:
HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\<IDE spec>\ExtPlainText
I've enabled other languages with:
HKCU\Software\Whole Tomato\Visual Assist X\<IDE spec>\RestrictVaToPrimaryFileTypes = 00
I've added a snippet for Text in the snippet editor, but it still does not work. |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19136 Posts |
Posted - Jun 24 2017 : 05:59:40 AM
|
The problem is that F# is a programming language the IDE understands, so it probably isn't treating the files as text files, which is confusing VA. What happens if you try telling VA that F# is actually C++ code?
https://wholetomato.fogbugz.com/default.asp?W328 |
zen is the art of being at one with the two'ness |
 |
|
tgaldi
New Member

2 Posts |
Posted - Jun 25 2017 : 09:02:49 AM
|
I tried with C++ and c# but snippets still do not work. |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19136 Posts |
|
|
Topic  |
|