How do I select a block from the keyboardT

I've been a long time TextMate user, and I'm trying to get used to the recent switch to RubyMine. One of the problems I keep stumbling into is that of selecting a block of text.

In TextMate, from the keyboard I'd:

  • navigate to the top left character of the block I wanted to select,
  • then hold down shift and navigate to the bottom right character of the block I want to select,
  • then release the shift key; and finally
  • hit the alt/option key.


The final keystroke would switch from stream (or line) mode to block mode.

Is there an alternative way to achieve this in RubyMine? So far, the only way I've found is to pick up the mouse, hold down alt and do the selection. I'd rather avoid shifting to the mouse if I can. :-)

6 comments

Hello,

In RubyMine just press a shortcut wich corresponds to RubyMine | Edit | Column Mode action. Then you can use column (block?) selection while holding Shift and moving a cursor with arrows keys.

0

Aha, that's good to know, and it's cmd-shift-numeric-keypad-* by default in the TextMate keymap, which is OK when I'm at a desktop but quite tricky when I'm on a laptop. :-)

I tried to set the keyboard shortcut to just alt, but I can't see how: is it possible to assign a shortcut to just a modifier key?

0

Aha, that's good to know, and it's cmd-shift-numeric-keypad-* by default in the TextMate keymap, which is OK when I'm at a desktop but quite tricky when I'm on a laptop. :-)

Please try cmd+shift+8 on your laptop

I tried to set the keyboard shortcut to just alt, but I can't see how: is it possible to assign a shortcut to just a modifier key?


No because such binding will disable lots of other useful shortcuts which use alt+[something]
0

Roman.Chernyatchik wrote:

Please try cmd+shift+8 on your laptop ;)


That doesn't seem to do ... anything. I'm on the default TextMate keymap using a recent Macbook Pro, if that makes any difference?

0

Yes, you are right. Meta+Alt+8 shortcut is missed for the action in TextMate Keymap (I'm using 'Default for MacOS' one). I've fixed it and fix will be available in next RubyMine 2.5 EAP. Also you can assign shortcut manually:
1. Open RubyMine | File | Settings | Keymap
2. Press "copy" button to copy default Textmate keymap
3. Enter "column" in actions search field
4. Choose "Column Mode" action, press "Add Keyboard Shortcut.." and press meta+shift+8
5. save settings

0

Please sign in to leave a comment.