Is there a {@code } macro

... macro or keyboard shortcut to generate a "{@code }" statement while inside a Javadoc and the cursor being placed just before the closing curly bracket? Would be so awesome :)

1

Hi reikje,

Do you mean generating '{@code'? It's not possible to do at the moment. However, you can make a live template that would allow to wrap any selected text into '{@code}'.

Denis

0

Here's a template of mine.
Installation instructions:
1. close all instances of IDEA
2. go into your <idea-confg>/templates/ directory
3. drop the attached file there. If the file already exists, copy the <template name="@code"...> section from the attachment and paste into your surround.xml file.

Usage instructions: select a javadoc fragment and press Ctrl+Alt+J.
Enjoy!

Hint to the JetBrains people: feel free to bundle this template into the next release.



Attachment(s):
surround.xml
1

I don't see that directory.  I see a fileTemplates directory.  I have IntelliJIdea2017.1 so maybe the directory changed for a newer version?  Is fileTemplates the new location?  Is there a way to do this manually from the Settings menus?

0

1

请先登录再写评论。