Foreword
I do not know Esclipse to IDEA, how many people are not used to. You do not say there are a variety Esclipse smell? But with the integration and the introduction of various frameworks, IDEA alternative Esclipse has become a necessity. All we can do is to adapt faster IDEA. Today we are saying is that we Eclise in a very commonly used shortcut Alt + / how to use (we use most often syso in Eclipse, and then marked Alt + / output can have print statements in the IDEA, but not in IDEA in this way, it has a more powerful template functions)
A. Custom template type (a function similar Esclipse Alt + /)
[1] Create a prompt code
By File-> Settings-> Editor-> Live Templates- > + -> Template Group created our template groups, which help us manage templates
click on our custom template set -> + Live Template, we created a template
Click define defined (for example, here we define as the use of Java)
results show
then press the Tab key to
this simple statement output function is complete, do not look troublesome steps than the Eclipse, but we can set up your own habits of various fast template statement .
[2] set the component content templates (such as html pages related to our style, etc.)
We carried out the appropriate create page content defined by the File-> Settings-> Editor-> File and Code Templates
[3] Note Templates settings class (that is, our class annotations head)
We carried out the appropriate create page content definitions> Includes - by File-> Settings-> Editor-> File and Code Templates
进行相应类注释内容的添加 如:
/**
* @Auther: Gs
* @Date: ${DATE}
* @Description: ${PACKAGE_NAME}
* @version: 1.0
*/
Results show (when we create a new Hello class, we will find more information on custom annotation):
to sum up:
Gradually I found this forgotten ex-girlfriend Eclipse, IDEA can be really too sweet.