Author |
Topic  |
|
alanchen
Junior Member
 
11 Posts |
Posted - May 22 2018 : 05:27:18 AM
|
Hi,
I am using Visual Assist 10.7.1929.0. Now I can add try-catch block for a codeline by:
1. Select the codeline. 2. Go to �VAssistX -> Surround with VA Snippet -> try (�) catch ()�
However, this is not convenient since each time I need to access the menu and submenu items for multiple times. I also see there is a shortcut for �try� snippet. So I try to use shortcut instead, as follows:
1. Select the codeline. 2. Input �try�. 3. When the �try (�) catch ()� line appear, I press �Enter� key.
However, this time the try catch block will OVERWRITE the existing codeline, instead of surrounding it.
How to create a shortcut that can surround the codeline with a specific VA Snippet?
Thanks |
|
feline
Whole Tomato Software
    
United Kingdom
19105 Posts |
Posted - May 22 2018 : 08:34:44 AM
|
This is easily available in more recent versions of VA, you can simply set a key that will trigger your snippet when you have selected text. You can download a trial version from here:
http://www.wholetomato.com/downloads/default.asp
in your current version, you could try changing the body for the default snippets "(...)" or "{...}" to have them do what you want, instead of their current default behaviour. |
zen is the art of being at one with the two'ness |
 |
|
sean
Whole Tomato Software
    
USA
2817 Posts |
Posted - May 22 2018 : 12:01:22 PM
|
See the Surround With edit field in the Snippet Editor; triggers can only be single characters. |
 |
|
alanchen
Junior Member
 
11 Posts |
Posted - May 22 2018 : 7:27:02 PM
|
quote: Originally posted by feline
in your current version, you could try changing the body for the default snippets "(...)" or "{...}" to have them do what you want, instead of their current default behaviour.
Sorry but I cannot understand you very well. The body of the default snippet is OK. The only problem is that I cannot find a shortcut that can surround a selected line. With the menu items, I can do that but that is not convenient. |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19105 Posts |
Posted - May 23 2018 : 06:03:57 AM
|
You can easily do this in the current version of VA. |
zen is the art of being at one with the two'ness |
 |
|
|
Topic  |
|