Sublime Forum

Invert Selection!?

#1

When I search for invert selection for Sublime Text 2 in Google I find Sublime Text 2ā€™s list of commands, one of which is invertSelection. When I create a keyboard shortcut for that command, it does not work. Iā€™ve also tried invert_selection. What am I missing here?

Hereā€™s my binding:

{ "keys": "ctrl+alt+i"], "command": "invertSelections"},

0 Likes

#2

Are you thinking about the reverse command?

I am not familiar with any invert command.

0 Likes

#3

It is listed here under invertSelection at this link:

http://www.sublimetext.com/docs/commands

Basically I want to be able to select a portion of the code, and hit a key, and then Sublime Text will deselect my current selection, and select everything that was not in my selection previously. Just like the command statesā€¦

0 Likes

#4

Those docs are out of dateā€¦ I donā€™t know if Sublime Text 2 has an invert command. One would be really easy to write, though.

0 Likes

#5

Thatā€™s funny. It must have become deprecated. Someone should put a notice up that those may not be valid commands listedā€¦

0 Likes

#6

Those commands are all from Sublime Text 1, which is why they donā€™t work.

0 Likes

#7

If only there was a similar commands list for ST2 :cry:

0 Likes

#8

I, too, wanted to find an ā€œinvert_selectionā€ (and ā€œclear_selectionā€) command and kept coming back to the ST1 command list. How can we be expected to create custom key bindings if thereā€™s no list of available commands for ST2? Could someone point me at such a list?

0 Likes

#9

Jon added inverted selection to ST3. Get it while itā€™s hot :smile:

0 Likes

#10

I didnā€™t find a working solution so here is mine.

{ "keys": ["ctrl+i"], "command": "invert_selection"},

0 Likes