Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

keyboard column selection in Sublime Text 2 on Ubuntu 12.04 with Cinnamon doesn't work

According to the documentation for Linux column select uses the following commands:

Linux

Ctrl+Alt+Up
Ctrl+Alt+Down

but on Ubuntu 12.04 with Cinnamon (not tested on Unity) this triggers the window switching operation (part of Cinnamon).

Anyone have a good fix for this (other than using the mouse...)

Thanks,

like image 544
CHsurfer Avatar asked Dec 16 '12 06:12

CHsurfer


People also ask

How do I select a specific column in Sublime Text?

Using the MouseDragging with the middle button / mouse wheel will do a column selection. You can use Ctrl and Alt with this too. Shift+Right mouse button is an alternative way to initial a column select. Dragging in the gutter (where the line numbers are), will select entire lines at once.

Does Sublime have a column mode?

Overview. Column Selection can be used to select a rectangular area of a file. Column selection doesn't operate via a separate mode, instead it makes use of multiple selections. You can use additive selections to select multiple blocks of text, or subtractive selections to remove a block.


1 Answers

I am used to using Ctrl+Alt+Up and Ctrl+Alt+Down as shortcuts for this operation. To make it work in Linux, you have to do two steps. First, need to disable system wide shortcuts by typing:

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down  "[]" gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up "[]" 

Logout and login afterward. Source: https://gist.github.com/michfield/5614949

Second step is to edit the Sublime Text configuration file, and change accordingly. I assume that everybody know how to do that. Just in case, add this in Preferences / Key Bindings - User

// change column select defaults - on Linux it was Shift+Alt+Up/Down { "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} }, { "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} } 

Tested on Mint 15 Cinnamon (RC), based on Ubuntu Raring.

like image 108
Michael Field Avatar answered Sep 24 '22 00:09

Michael Field