简体   繁体   English

在Eclipse中设置自动完成快捷方式

[英]Setting auto complete shortcuts in Eclipse

When programming Java in Eclipse, I can type syso and press control+space to auto-complete this and get System.out.println(); 在Eclipse中编写Java时,我可以输入syso并按下control + space来自动完成它并获取System.out.println(); . I was wondering if there are settings somewhere in Eclipse to allow me to set other shortcuts of this form. 我想知道Eclipse中是否有某些设置允许我设置此表单的其他快捷方式。 (For instance, I'd like to type syscur and have this auto-complete to System.currentTimeMillis(); .) (例如,我想键入syscur并将此自动完成到System.currentTimeMillis(); syscur

You can do this here: Window -> Preferences -> Java -> Editor -> Templates . 您可以在此处执行此操作: Window - > Preferences - > Java - > Editor - > Templates You can also add a Template View, which you find at Window -> Show View -> Other -> Search for Templates. 您还可以添加模板视图,您可以在Window - > Show View - > Other - >搜索模板中找到该Show View

此功能称为代码模板

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM