IDEA小技巧-同时编辑多行

idea

如果要实现在多行前面添加一样的内容,比如已知id的列表拼接sql

1 => select * from table where id=1
2 => select * from table where id=2
3 => select * from table where id=3
4 => select * from table where id=4
5 => select * from table where id=5
6 => select * from table where id=6
7 => select * from table where id=7
8 => select * from table where id=8
9 => select * from table where id=9

只要选中第一行你要开始编辑的地方,按住alt,然后按住鼠标开始向下拖动,会发现光标变长了,然后就输入你想要添加的内容就行啦,同理可以批量垂直选择文本批量修改

本文使用OpenWrite进行编写

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容