Author |
Topic |
|
condenser
New Member
2 Posts |
Posted - Jul 05 2007 : 7:50:32 PM
|
Would it be possible to allow other shortcut triggers (besides slash, hyphen, etc.)? For example, could '@' or '$' be added as extra shortcut triggers?
I would like to use these for specific lines for doxygen documentation. For example, having autotext for @fn insert:
/// @fn $end$
|
|
kevinsikes
Tomato Guru
USA
271 Posts |
Posted - Jul 06 2007 : 03:15:58 AM
|
Hello condenser,
To prevent VA X from inserting Autotext unexpectedly while a user is typing, we have restrictions on special characters in Autotext shortcuts. Please see http://www.wholetomato.com/products/features/autotext.asp#shortcut for more information. May I suggest using doxf or dxf as the shortcut -- anything that is short, easy to remember, and unlikely to be used as a symbol name in your project will do. Also, no special characters in the shortcut means not having to press the shift key while typing the shortcut, saving you a bit more time.
Given your example, I also wanted to let you know that specifying $end$ at the physical end of the code is unnecessary. Use the $end$ directive to reposition the caret after the text is inserted. In the following example, the caret is placed in the optimal position after the for statement is inserted:for ($end$;;) |
Kevin Sikes Infotainment Platform Design Engineer Ford Motor Company |
|
|
condenser
New Member
2 Posts |
Posted - Jul 08 2007 : 6:28:21 PM
|
I understand. The reason I would be using different triggers is that (for example) doxfn is what I use for a more elaborate template, which contains a whole preformatted block. I would like to use the @ versions to insert the single line with the function documentation entry for doxygen.
doxyfn would insert:
/////////////////////////////////////////////////////////////////////// /// @fn $Function$ /// @brief $end$ /// @details /// @param[in] /// @return ///////////////////////////////////////////////////////////////////////
bool $Function$(void);
@doxyfn would insert:
/// @fn $end$
(Thanks for the superfluous $end$ tip...I think it was in there originally for parallelism) I understand the design logic to prevent inserting text unexpectedly, but I figured the @ symbol was relatively unused. However, could it be a system option to specify special characters allowed for Autotext, thus leaving the burden of accident on the end user? I like the flexibility for Autotext, and allowing certain special characters would allow shortcuts that don't depend on symbol exclusivity within the code.
This would especially apply in refactoring code written by several programmers, who use all varieties of symbol names. It seems more flexible to allow some special characters that aren't used in C++ (or whatever language is being used) be similar to an "escape sequence" to trigger autotext. This is similar to inline shortcuts I have seen in medical transcription software.
The issue is that as our project is adopting more automated documentation, we are trying to have template shortcuts that are easy to remember but don't conflict with other templates we already use. We are sort of running out of names (due to all of the doxygen documentation features and different layouts we are using), and having at least one more special character would be extremely useful.
Perhaps an edit box in the Visual Assist X configuration where you specify the special characters you would like to allow for Autotext shortcuts?
|
|
|
kevinsikes
Tomato Guru
USA
271 Posts |
Posted - Jul 09 2007 : 12:24:02 AM
|
condenser,
I've asked our developers if there are any technical limitations to expanding the field of permissible shortcut characters. I'll reply to this post when I find out. Thanks for your suggestion. |
Kevin Sikes Infotainment Platform Design Engineer Ford Motor Company |
|
|
|
Topic |
|
|
|