IntelliJ IDEA 多行编辑方式 [英] IntelliJ IDEA way of editing multiple lines

查看:37
本文介绍了IntelliJ IDEA 多行编辑方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 TextMate 中看到了这个,我想知道是否有办法在 IDEA 中做到这一点.

I've seen this done in TextMate and I was wondering if there's a way to do it in IDEA.

假设我有以下代码:

 leaseLabel = "Lease";
 leaseLabelPlural = "Leases";
 portfolioLabel = "Portfolio";
 portfolioLabelPlural = "Portfolios";
 buildingLabel = "Building";

将 '+ "foo"' 附加到每一行的最佳方法是什么?列模式将不起作用,因为右侧的行没有正确对齐......除非有一种简单的方法可以使文本右对齐:P

What is the best way to append '+ "foo"' to every line? Column mode won't work since the lines are not correctly aligned on the right side... unless there is an easy way to right justify the text :P

推荐答案

从 Idea IntelliJ IDEA 13.1 开始,可以编辑多行.

Since Idea IntelliJ IDEA 13.1 there is a possibility to edit multiple lines.

Alt + Shift + 鼠标点击

Option + Shift + 鼠标点击

供选择.更多关于 IntelliJ 博客文章的新改进 此处.非常有用的功能.

for selection. More about this new improvement in the IntelliJ blog post here. Very useful feature.

这篇关于IntelliJ IDEA 多行编辑方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆