Sublime Forum

Subtract from selection

#1

I read from the docs that in order for me to subtract from a selection, using the ALT key works.

But after selecting a few lines of text using CTRL + mouse drag , I pressed ALT + mouse drag and nothing happened.

Any advice is appreciated. :smiley:

0 Likes

#2

ALT+drag only works when you are trimming the ends of a selection, not the middle. Start ALT+dragging outside a selection endpoint and drag over the selection for it to work.

If you want to “paint” selections, you can use mousewheel (column select) and ALT+mousewheel (column unselect).

0 Likes

#3

it still doesn’t work. I tried what you said, hovering my cursor outside the already selected text and then holding CTRL + mouse drag to the end of the selection.

=/

0 Likes

#4

Maybe a plugin ?
In the console type:

sublime.log_commands(True)

Next try to first select a text with the mouse, then add selection with ctrl+mouse.
You must have something like that in the console:

command: drag_select {"event": {"button": 1, "x": 402.5, "y": 161.5}} command: drag_select {"additive": true, "event": {"button": 1, "x": 370.5, "y": 430.5}}

0 Likes

#5

Yup I got something similar to what you have :smiley:

I think I worked out how the subtraction selection works in Sublime …

You can only subtract only from the last line from the selected lines right ?

On a sidenote, how do I deactivate logging ? It tried changing the command to ‘false’, but it didn’t work.

0 Likes

#6

You’re correct, it must works:

sublime.log_commands(False)

Not sure what you mean here, but I think you’re incorrect:
You can add selection with ctrl+button1 or subtract selection with alt+button1 anywhere, not only on the last selected lines.
At least in Windows 7, what’s your OS ?

0 Likes