Sublime Forum

Cmd+F and Ctrl+V not working [macOS]

#1

Hello,

I’m experiencing an issue with keyboard shortcuts in Sublime Text on macOS.

When I press Cmd+F to open the Find panel and then Cmd+V to paste text into the search field, the shortcuts don’t work as expected.

However, when I click the Find button in the editor’s interface, the search works correctly.

https://youtu.be/dGPdpxZWxFU

Could you please help me identify the cause of this issue?

Thank you!

0 Likes

#2

If you open the console (View > Show Console) and enter sublime.log_input(True); sublime.log_commands(True), what gets logged when you press cmd+f and cmd+v?

0 Likes

#3

Hi,

Thank you for your help.

I enabled input and command logging in the console as requested.

When I press Cmd+F and Cmd+V, the console logs the following:

sublime.log_input(True); sublime.log_commands(True)
command: drag_select {“event”: {“button”: 1, “x”: 600.7421875, “y”: 546.8125}}
key evt: super+c
command: copy
key evt: super+f
command: show_panel {“panel”: “find”, “reverse”: false}
key evt: super+v
command: paste
key evt: super+f
command: show_panel {“panel”: “find”, “reverse”: false}
key evt: super+v
command: paste
command: show_panel {“panel”: “console”, “toggle”: true}
command: drag_select {“event”: {“button”: 1, “x”: 8.91015625, “y”: 1038.03515625}}

Both keyboard shortcuts are recognized, and the corresponding commands are executed. However, the shortcuts still don’t work as expected in the Find panel.

What would you suggest checking next?

0 Likes

#4

Safe Mode
https://youtu.be/Cx7Odrmu8as

0 Likes

#5

I’ve done some additional testing.

  1. Manually typing a search term in the Find panel works correctly.
  2. Pasting text using the context menu’s Paste command also works correctly.
  3. Pasting the same text using Cmd+V sometimes fails to update the search results, even though the text appears correctly in the Find field.
  4. If I modify the pasted text by adding a character and then remove it, the search results update correctly.
  5. The issue also occurs in Safe Mode.

The console logs show:

key evt: super+f
command: show_panel {“panel”: “find”, “reverse”: false}
key evt: super+v
command: paste

Could this be related to how the Find panel updates its results after a keyboard paste operation?

0 Likes

#6

Not sure if it helps, but I’m a Mac user and things perform as expected for me. As soon as I paste, it immediately highlights the first match. I hit enter and it moves to the next match (find_next).

MacOS 27.0.1; ST4214

key evt: super+f
command: show_panel {"panel": "find", "reverse": false}
key evt: super+v
command: paste  # first match
key evt: enter  # next match
command: find_next

PS - If you are trying to find the next instance of a search term in the same file, then you can bypass the find bar altogether. Simply select the text you want to search for and use one of the quick find options - much faster!

image

0 Likes

#7

Thanks for posting the video, that makes it a lot easier to diagnose. The issue only happens when pasting over the top of the same text, ie. “test” is already written in the find panel and paste is used to override “test” with “test”. We’ll be looking into a fix for this.

1 Like

#8

Thanks for your reply!

The issue occurs specifically when the Find field already contains a search term, and I select that term and paste the exact same text over it using Cmd+V.

In this case, the search results are not updated. However, if I manually modify the search term by adding and then removing a character, the results update correctly.

I need to use Cmd+F → Cmd+V , rather than pressing Enter, because I process a lot of information and repeat the same actions many times. I use my left hand for Cmd+F → Cmd+V, while keeping my right hand free to operate the trackpad. This workflow is much more efficient for me.

There’s another important detail: after using Cmd+F → Cmd+V once, the search works, but if I switch to another file and then return to the previous one, repeating Cmd+F → Cmd+V no longer highlights any matches.

So the problem isn’t just about moving to the next match with Enter. It’s about being able to repeatedly search for text using the same keyboard shortcut sequence, even when switching between files.

The Sublime Text developers have already confirmed the issue and said they’ll be looking into a fix.

Thanks again for sharing your experience!

0 Likes

#9

Thx for looking into this and for working on a fix! I really appreciate your help.

One thing I’d like to mention is that I hadn’t noticed this issue before updating Package Control. It seems to have appeared after the update, although I’m not sure whether the two are actually related.

Thx again for your time and for looking into it!

0 Likes

#14

I’ve found the cause of the issue, or at least narrowed it down considerably.

I tested the same workflow in two versions of Sublime Text on my Mac:

  • Build 4192: The search works correctly.
  • Build 4215: The bug occurs when I use Cmd+F followed by Cmd+V to paste the same text that’s already in the Find field.

This confirms that the issue is specific to the newer build, rather than my configuration or installed packages.

Hopefully, this helps you identify the regression.

0 Likes