Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Allow suggestions for named VA-Snippets in comment
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

xMRi
Tomato Guru

Germany
315 Posts

Posted - Sep 17 2008 :  2:53:23 PM  Show Profile  Reply with Quote
When I write longer comments it would be useful to have suggestions for named VA-Snippets and variables or classnames.
Maybe this feature should be enabled by a special option in the settings.

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Sep 17 2008 :  6:58:31 PM  Show Profile  Reply with Quote
If you press CTRL-SPACE you should get a listbox, even in a comment, which is ideal for typing class and function names.

More general suggestions / snippets are likely to get in the way in comments. "for" is a good example, it is a common word in English comments, but it is also something I have several VA snippets for

zen is the art of being at one with the two'ness
Go to Top of Page

xMRi
Tomato Guru

Germany
315 Posts

Posted - Sep 18 2008 :  02:21:11 AM  Show Profile  Reply with Quote
Sorry! This works for symbols. But I can not get my VA-Snippets in the comments.
I have a named snippet called "filec" (file comment). If I type filec in a comment region I don't get the corresponding suggestion even if I press Ctr+Space.

OK! May be now it is the wrong forum and we should move into the bugs section ;)

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Sep 18 2008 :  11:01:37 AM  Show Profile  Reply with Quote
This is the right forum No suggestions in comments is a feature / design decision in VA.

Are you using C style /* */ comments or C++ // style comments?

I have the same situation, sometimes I want to use VA snippets to help me write comments. I use // style comments in my code, so my VA snippets insert an entire line, or several lines. So I just start a new blank line and type the snippet shortcut and accept the listbox.

Normally if listboxes of any type start appearing when people type in comments then we get lots of bug reports about this, since they get in the way.

zen is the art of being at one with the two'ness
Go to Top of Page

xMRi
Tomato Guru

Germany
315 Posts

Posted - Sep 19 2008 :  02:15:39 AM  Show Profile  Reply with Quote
I am using C style comments /* */ in ths case.

Again: Ctrl+Space shows me a list of smybols but no snippets!

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Sep 22 2008 :  10:58:12 AM  Show Profile  Reply with Quote
Apologies, my fault, I am not making myself clear. CTRL-SPACE is never going to give you a list of snippets, it does not work like that in C++

If snippets were made active in comments then you would see a snippet listbox every time you typed a word starting with "t" or "f", for the "true" and "false" snippets, assuming you have them.

My concern is that most snippets are just going to get in the way while typing comments.

How many snippets do you want active in comments? Are there a lot, or is it only a small number? I am wondering if snippets are the best solution, or if there is a better approach.

zen is the art of being at one with the two'ness
Go to Top of Page

xMRi
Tomato Guru

Germany
315 Posts

Posted - Sep 23 2008 :  02:29:21 AM  Show Profile  Reply with Quote
Hmmm. It is just a small number of comment snippets.

I just have for the documentation standard blocks (snippets). I just want to use them inside my documentation. Its just like a function description block. But I like to use the different parts that I have on demand.

But there is no way to do this why typing my comments.

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Sep 23 2008 :  3:41:41 PM  Show Profile  Reply with Quote
You could use IDE macro's, one per comment block. If there is only a small number of comment blocks and they do not change to often then this is a reasonable option. You can then use the IDE options dialog to bind a separate keyboard shortcut to each of these comment macro's.

I used Snippets when I had the same problem, but since I was using // comments I could simply start a new line and the snippets would be suggested, which is clearly not working here.

zen is the art of being at one with the two'ness
Go to Top of Page

xMRi
Tomato Guru

Germany
315 Posts

Posted - Sep 24 2008 :  02:05:24 AM  Show Profile  Reply with Quote
Only way I could imagine, is a spereate short cut, that just opens the VA-snippet selector...

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Sep 24 2008 :  07:23:01 AM  Show Profile  Reply with Quote
You can bind a keyboard shortcut to the command VAssistX.VaSnippetInsert which will list all VA Snippets for the current language.

If you use drag and drop to place the comment snippets at the top of the tree in the VA Snippet editor then they will be at the top of the menu when it appears.

zen is the art of being at one with the two'ness
Go to Top of Page

xMRi
Tomato Guru

Germany
315 Posts

Posted - Sep 24 2008 :  09:06:03 AM  Show Profile  Reply with Quote
That is a solution!

THX feline!


Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000