Sublime Forum

Ctrl + double click (to select multiple words with multiple cursors) stopped working

#1

Hi guys,

I’ve been a Sublime user for years. I’m currently running it on Ubuntu 16.04.

One thing I commonly do is ctrl + double click to create multiple cursors with highlighted words. Sadly, this stopped working recently. I can still ctrl + click to create multiple cursors, but when I ctrl + double click, it seems as if the first click is a normal ctrl + click (creates another cursor) but then on the second click it’s treated like a normal click when you have multiple cursors (which gets rid of the multiple cursors, just leaving you one cursor where you last clicked).

Any ideas?

0 Likes

#2

This sounds suspiciously like you installed a package that is interfering. You might want to test with no packages to see if that restores the functionality and if so slowly add them back one by one until you hit on the one that’s messing things up.

1 Like

#3

Not gonna lie, I thought there was no way this would work since I hadn’t installed any new packages in months… but removing them all restored the functionality! Adding them back one by one found the culprit: Typescript! And I was hoping it was that package, since I have moved to VS Code for my Typescript stuff, so I don’t even miss getting rid of that plugin in Sublime :slightly_smiling:

Thanks so much! I am very happy now.

2 Likes

#4

packages are updated automatically, so even if you haven’t installed any new ones, maybe a package author pushed out an update that broke something…

the Typescript package is notorious for breaking mouse related functionality

1 Like

#5

Ironically I was actually going to use that as an example because I thought I remembered someone else saying just that recently, but I didn’t have time to check so I left it out.

That’s one of the plugins I use, but it turns out I don’t often use the mouse (very used to all-keyboard from my many years of vim) so the only problem I’ve encountered is with it’s syntax definition, which is slightly wonky.

0 Likes

#6

Besides all other comments, there’s another key binding for this functionality that I find to be much more comfortable, double click then F3
for me its nicer because I use search a lot and F3, and SHIFT+F3 are the keys to go to next or prev

0 Likes

#7

Hi!

An other solution would be to set different cursor (ctrl+click), and then ctrl+d.

Mathieu

0 Likes

#8

I had the same problem. I tried to disable recently installed packages and found that in my case the package that influented on ST was TypeScript. Then I disables it, the problem disapeared.

0 Likes

#9

I think the easiest solution is to create a file Default (Linux).sublime-mousemap (use Windows or OSX instead of Linux on other plattforms) in the User directory and add the content

[
    {
        "button": "button1", "count": 1, "modifiers": ["ctrl"],
        "press_command": "drag_select",
        "press_args": {"additive": true}
    },
    {
        "button": "button1", "count": 2, "modifiers": ["ctrl"],
        "press_command": "drag_select",
        "press_args": {"by": "words", "additive": true}
    },
]

This will just overwrite the mouse binding and you don’t need to disable a package or test anything. In general you can use PackageResourceViewer to open Default/Default (Linux).sublime-mousemap and copy the corresponding entries or the whole content to preserve the mouse binding.

2 Likes

#10

Thank you @r-stein ! This bug was stopping me to double click to multiple select in my two Linux computers. This solved my problem.

0 Likes

#11

Hi!

Thank you, didn’t know we could bind commands to mouse event!

Matt

0 Likes

#12

Thanks you saved me hours of adding one by one package - That worked for me!

0 Likes