Sublime Forum

soft_undo (ctrl + u) not working properly

#1

Since a few weeks, the soft_undo (ctrl + u, after having press ctrl + d to select words) works in a random way. I need to press it 2 or 3 times before the soft_undo actually happens. This is what the console prints:

command: find_under_expand
key evt: control+d
command: find_under_expand
key evt: control+d
command: find_under_expand
key evt: control+u
key evt: control+u
key evt: control+u
command: soft_undo
key evt: control+u
command: soft_undo

As you can see “find_under_expand” (ctrl+d) works right away, but I have to press ctrl+u three times before it does it. Then it does it right away after that.

It used to work fine for several years but recently it’s started doing this.

Any idea what could be causing this?

I’m on Ubuntu 16.04, Sublime Text 3114

0 Likes

#2

This might be cause by a package defining a ctrl+u,… binding. Try if disabling a few packages fixes it.

0 Likes

#3

Yes thank you that was it. The URLEncode plugin overrides the Ctrl+U shortcut (which it probably shouldn’t). I’ve fixed it by restoring the shortcut in my keymap file:

{ "keys": ["ctrl+u"], "command": "soft_undo" }
0 Likes

#4
{ "keys": ["ctrl+u", "ctrl+e"], "command": "urlencode" },
{ "keys": ["ctrl+u", "ctrl+d"], "command": "urldecode" }	

to be precise (which is what I meant with my ellipsis).

0 Likes

#5

I’ve informed the author, who ended up removing the shortcut from the package, which is pretty cool - https://github.com/mastahyeti/URLEncode/pull/10

1 Like

#6

Also Emmet package has a keybinding that conflicts with soft undo native command:
{ "keys": ["ctrl+u"], "args": {"action": "update_image_size"}, "command": "run_emmet_action", ...},

0 Likes

#7

Emmet is the prime example of a package not respecting default bindings. There are countless examples.
On the upside, it provides options to disable pretty much all of its bindings (which still means they are overridden by default).

1 Like