1.在eclipse中使用velocity模板时,后缀.vm文件默认是如下的样式:

eclipse中.vm格式文件高亮显示

看起来很不舒服,此时需要进行手动修改样式:

1.打开Eclipse ---》window----》preference -----》Content type-----》Text----》Html -----》Add ------》弹出窗口 File type : 

2.在输入框中输入 *.vm  点击OK   ,选中新加入得*.vm   

3.在下面的 Defualt encoding 中输入:"utf-8“ 单击 update ,点击ok,设置完毕。重新打开*.vm  页面

如图:

eclipse中.vm格式文件高亮显示

设置后的效果为:

eclipse中.vm格式文件高亮显示

相关文章: