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!
Yes, this feature is called Column Mode and can be enabled via Edit menu or keyboard shortcut.
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.)
精彩评论