如何在PHPStorm中将多行选择扩展到全行? [英] How can I expand multi-line selection to full lines in PHPStorm?

查看:942
本文介绍了如何在PHPStorm中将多行选择扩展到全行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Sublime Text中,我可以任意选择一组行,然后使用⌘+L将选择范围扩展到全行. PHPStorm/WebStorm中是否有类似的命令? (我想将该命令映射到键盘快捷键.)

我知道PHPStorm可以选择在插入符号处选择行",但是只能选择一行.

解决方案

我也没有在Sublime中经常使用的PHPStorm中缺少此功能.仍然不可能通过键盘在所有选定行上设置插入记号.这是我所能接近的,并且对我有用.

转到设置">键盘映射".搜索Clone Caret Above/Below. 我在Mac上工作,所以设置了这样的按钮

看起来有些怪异,但上方的Clone Caret是CMD+SHIFT+CTRL+ARROW_UP,下方的Clone Caret是CMD+SHIFT+CTRL+ARROW_DOWN

然后单击应用",它将起作用

In Sublime Text I can arbitrarily select a set of lines and then use ⌘+L to expand the selection to the full lines. Is there a similar command in PHPStorm / WebStorm? (I'd like to map that command to a keyboard shortcut.)

I know PHPStorm has the option "Select Line at Caret", but that selects only one line.

解决方案

I was also missing this functionality in PHPStorm which I used often in Sublime. Still it aint possible to set a caret by keyboard on all selected lines. This is as close as I could get it and it does the trick for me.

Go to settings > Keymap. Search for Clone Caret Above/Below. I'm working on a Mac so I set up the buttons like this

It is looking a bit weird but it is CMD+SHIFT+CTRL+ARROW_UP for Clone Caret Above and CMD+SHIFT+CTRL+ARROW_DOWN for Clone Caret Below

And then click on Apply and it will work

这篇关于如何在PHPStorm中将多行选择扩展到全行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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