Sublime Forum

Linux - Keyboard Shortcut for Replace All

#1

Hello

What’s the keyboard shortcut on Linux for invoking the “Replace All” in the Replace Dialog? According to http://docs.sublimetext.info/en/latest/search_and_replace/search_and_replace.html it should be Ctrl+Alt+Enter and when I hover the mouse over the “Replace All” button, it also shows Ctrl+Alt+Enter.

But when I press Ctrl+Alt+Enter, nothing happens.

I’m on Ubuntu 16.04 with Gnome and Sublime 3 Build 3126.

Thanks,
Alexander

0 Likes

#2

It works for me, maybe the key binding has been overridden by something else or ST doesn’t detect it for some reason?

If you open the ST console (View menu -> Show Console) and type sublime.log_input(True) Enter and press Ctrl+Alt+Enter, does it correctly show in the console?

>>> sublime.log_input(True)
key evt: control+alt+enter

If it does, then try https://packagecontrol.io/packages/FindKeyConflicts to find what is causing the problem

0 Likes

#3

@kingkeith, thanks, I tried that, and when I then press Ctrl+Alt+Enter, while I’m still in the Sublime window, nothing is shown.

I then pressed Ctrl+H to get the Replace dialog shown and in the console, it shows: key evt: control+h.

0 Likes

#4

hmm, it seems ST isn’t receiving the key press events for that key combination - maybe something else is handling them before ST can

these Q/A pairs may help you find out what:


0 Likes

#5

Will have a look there, thanks.

TBH, I don’t quite like the default shortcuts of ST3. Sure, you can change everything, but that’s annoying. For example, show console: Ctrl+`.
That’s impossible to type, as ` is a “dead key” (at least on my Swiss German keyboard layout).

Or toggle comment: Ctrl+/
Nothing happens, when I press Ctrl+Shift+7 (as Shift+7 returns /) or Ctrl+Numpad /

Oh, well…

I’ve now read https://askubuntu.com/questions/575631/how-do-i-find-all-key-bindings-in-ubuntu-14-04 and it doesn’t show anything:

$ gsettings list-recursively  org.gnome.desktop.wm.keybindings | sort | grep -i alt | grep -i control                
org.gnome.desktop.wm.keybindings cycle-panels-backward ['<Shift><Control><Alt>Escape']
org.gnome.desktop.wm.keybindings cycle-panels ['<Control><Alt>Escape']
org.gnome.desktop.wm.keybindings minimize ['<Control><Alt>KP_0']
org.gnome.desktop.wm.keybindings move-to-workspace-down ['<Shift><Control><Alt>Down']
org.gnome.desktop.wm.keybindings move-to-workspace-left ['<Shift><Control><Alt>Left']
org.gnome.desktop.wm.keybindings move-to-workspace-right ['<Shift><Control><Alt>Right']
org.gnome.desktop.wm.keybindings move-to-workspace-up ['<Shift><Control><Alt>Up']
org.gnome.desktop.wm.keybindings switch-panels-backward ['<Shift><Control><Alt>Tab']
org.gnome.desktop.wm.keybindings switch-panels ['<Control><Alt>Tab']
org.gnome.desktop.wm.keybindings switch-to-workspace-down ['<Control><Alt>Down']
org.gnome.desktop.wm.keybindings switch-to-workspace-left ['<Control><Alt>Left']
org.gnome.desktop.wm.keybindings switch-to-workspace-right ['<Control><Alt>Right']
org.gnome.desktop.wm.keybindings switch-to-workspace-up ['<Control><Alt>Up']
org.gnome.desktop.wm.keybindings toggle-maximized ['<Control><Alt>KP_5']
org.gnome.desktop.wm.keybindings toggle-shaded ['<Control><Alt>s']
0 Likes

#6

it could be related to the fact that ST doesn’t handle keyboards with dead keys very well

1 Like

#7

Might be, but / isn’t a dead key and neither is enter :slight_smile:

1 Like

#8

oh I should have mentioned that ST doesn’t handle various keyboard layouts brilliantly either :wink:

0 Likes

#9

When using sublime.log_input(True) it did not return Ctrl+Alt+Enter, but it did return Ctrl+AltGr+Enter (the right alt).
After a little googling I found this SO entry, one the answers say, it might be a GNOME issue, Ctrl+Alt being picked up as input language change.

sudo apt install gnome-tweaks can help in disabling this.

After intsalling go into Keyboard & Mouse > Additional Layout Options > Switching To Another layout, and disable Ctrl+Alt

0 Likes