使用 idea 批量操作

一、准备代码:

1
2
3
4
5
6
7
8
private String code;//项目编码
private String name;//项目名称
private String sex;//适用性别
private String age;//适用年龄(范围),例如:20-50
private Float price;//价格
private String type;//自由行类型,
private String remark;//项目说明
private String attention;//注意事项

二、使用 Alt+鼠标拖动

1
2
3
4
5
6
7
8
|private String code;//项目编码
|private String name;//项目名称
|private String sex;//适用性别
|private String age;//适用年龄(范围),例如:20-50
|private Float price;//价格
|private String type;//自由行类型
|private String remark;//项目说明
|private String attention;//注意事项

三、使用 Ctrl+Shift+右方向键

作用:跳一个单词,使用 Backspace 删除。

1
2
3
4
5
6
7
8
code;//项目编码
name;//项目名称
sex;//适用性别
age;//适用年龄(范围),例如:20-50
price;//价格
type;//自由行类型
remark;//项目说明
attention;//注意事项

四、使用 Shitf+End

作用:从当前位置跳到最后,使用 Backspace 删除。

1
2
3
4
5
6
7
8
code,
name,
sex,
age,
price,
type,
remark,
attention,

五、使用 Ctrl+Backspace,回到一行

1
code,name,sex,age,price,type,remark,attention,

六、操作演示