Keyboard Column Selection for Sublime Text 2 on Windows

Go To StackoverFlow.com

23

I've been trying to get column selection via keyboard bindings working on Windows.

The Default (Windows).sublimekeymap says this:

{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} },

And it is also documented here: http://www.sublimetext.com/docs/2/column_selection.html However, every time I try to do column selection via the keyboard it doesn't work. Is this an environment specific problem or an actual bug? Or perhaps I'm doing something wrong.

2012-04-04 21:24
by ciriarte


20

Assuming you are getting multiple cursors when you go up in a block of text with Ctrl+Alt+Up, you then need to use Shift+Left and Shift+Right to make the column selection.

If you are not getting multiple cursors at all, try changing the keybindings just to up and down, see if that works. It may be that your windows environment is using Ctrl+Alt+Up` for something else and prevents its use in Sublime.

2012-04-05 08:12
by fraxel
Indeed. The Intel graphics adapter was capturing ctrl+alt+up and ctrl+alt+down. I had to: Right Click on the Desktop > Select Graphic Options > Hot Keys > Disable - ciriarte 2012-04-06 15:23
This was my issue, my graphics card was catching the default keyboard shortcut and so I simply assigned it to something else. If you've got an intel based graphics card, this issue will likely impact you - jwhaley58 2013-07-19 18:20
I already had hotkeys disabled in the Intel graphics service, but it was still capturing ctrl+alt+up/down all the same. I had to change the actual hotkeys in the Intel graphics config to something else to get ctrl+alt+up/down to work in Sublime Text - dan-gph 2014-09-09 04:38
Just had the same problem, and indeed disabling the hotkeys wasn't enough. Why those are hotkeys in the first place (much less enabled by default) is utterly baffling - Jake Bathman 2015-09-09 15:04


10

Not the right spot for this exactly, but if you RDP into a VM, the defaults won't work either.

I've redefined the line reordering binding of Ctrl+Shift for this purpose

{ "keys": ["ctrl+shift+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+shift+down"], "command": "select_lines", "args": {"forward": true} }
2012-09-17 19:18
by Ethan J. Brown


9

I think that is really late but, I found the following the most effective solution.

  1. Put this in your "Key bindings defaults" and save it

    { "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} },
    { "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} },
    
  2. After, you can use the following to make a column selection

    Alt + Shift + [Down | Up]

2013-08-11 01:53
by José Gabriel González
These key commands do feel much more natural. They mimic the Notepad++ behavior. First you use Alt+Shift+Up to select the text then you just let go of Alt and keep holding Shift and select the columns of text you want using Left / Righticc97 2014-10-28 11:05


1

I had the same problem because of Winamp Global Hotkeys. Just remove that key combination from Winamp Preferences and it will work.

2013-09-13 23:48
by Dan
Ads