Reputation: 4233
I watched this video:
https://www.youtube.com/watch?v=8LXJfYvq8z8
and tried to make a live template for try catch block.
try {
$SELECTION$
} catch ($TYPE$ $$$VARIABLENAME$) {
$END$
}
Now I select a code which I want to be surrounded and choose this template. I get:
try {
} catch ( $) {
}
No selected code in try block. What is wrong? Version is 2016.3.2, build on December 20, 2016
Is it a bug or I am doing something wrong?
Upvotes: 3
Views: 520
Reputation: 4233
Found an answer while watching another video: https://www.youtube.com/watch?v=h5p90FvJo0Y
It turns out that I have to not only select text, but also use different shortcut.
By default it is ctrl + alt + J. I was using ctrl + J so thats why it did not work.
Upvotes: 8