Does RubyMine have TextMate-style multiple line editing?

强颜欢笑 提交于 2019-12-10 13:18:04

问题


Is there a shortcut key for editing multiple lines in RubyMine (Windows) as you can do with TextMate? I've seen it in TextMate where you can highlight multiple lines, and press a key code, then start typing. All text you type will appear at the end of all of the highlighted lines. I would love to do this with RubyMine as well.

Thanks!


回答1:


Yes, this feature is called Column Mode and can be enabled via Edit menu or keyboard shortcut.




回答2:


RubyMine version 6.3 and later has real multiple line editing. Simultaneously edited areas of text need not be vertically adjacent and vertically aligned (as they must be to use Column Selection Mode).

Briefly,

  • option-click (on Mac; alt-click on Windows or Linux) to create additional carets, edit as usual, then hit escape to revert to a single caret
  • select some text and control-G (on Mac; alt-J on Linux and Windows) to search for the next occurrence of that text and add a caret to it
  • There are also editor commands to add carets (Clone Caret Below, Clone Caret Above) that are not bound by default, but that you can bind to keys of your choice.

More here: What’s Mining: Multiple Cursors and Selection

(Column Selection Mode still works fine for areas of text that are vertically adjacent and aligned.)



来源:https://stackoverflow.com/questions/6047085/does-rubymine-have-textmate-style-multiple-line-editing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!