Support macOS "find clipboard"

Use case or problem

Apps on macOS typically support a suite of find and replace operations. These work through a notion of a “find clipboard” which represents the current search phrase. The find clipboard works across apps, so that users can selected/set a search phrase in one app, then switch to another app and continue the same search.

Long-time macOS user have muscle memory for keyboard shortcuts related to find, such as:

  • Cmd-F — show a field for editing the contents of the find clipboard and a button for searching for the phrase on the find clipboard
  • Cmd-E — copy the current selection to the find clipboard, typically named “Use Selection for Find”
  • Cmd-G — find the next occurrence of the current search phrase, typically named “Find Next”
  • Cmd-Shift-G — find the previous occurrence of the current search phrase, typically named “Find Previous”

Obsidian currently supports the first of these (Find), but doesn’t provide commands for the others. Additionally, Find doesn’t copy the search phrase to the find clipboard, so doesn’t support the expected cross-app searching.

Proposed solution

  • Obsidian on macOS should use the system find clipboard for its existing find command.
  • Obsidian should provide commands in the command palette for “Use Selection for Find”, “Find Next”, and “Find Previous”.

Given that Command-E is already bound to toggle edit/preview mode by default, perhaps it would be too disruptive to use the system standard keyboard shortcuts for the new commands. But if the commands themselves existed, users could configure them however they want.

Current workaround (optional)

You can work around the absence of these commands and find clipboard interaction through a combination of copy and paste and mouse clicks.

4 Likes

+1 on this request!

An additional detail of the standard Mac behavior that’s not mentioned in the above request - “Find Next” and “Find Previous” commands should work even when the “find” textbox is not showing, the commands just use whatever text is on the “find clipboard”

I too would love to see this in Obsidian. Cmd+E, Cmd+(Shift)+G, Cmd+(Shift)+F are standard shortcuts on the Mac like Cmd+X/C/V.

1 Like

Yes, please, please implement this! I found it surprising that this feature doesn’t exist. It is in my muscle memory to use ⌘E ⌘G in MacOS applications. It works almost everywhere, a notable exception being the Microsoft Office apps.

As @curt suggests, if these commands were available in the menu then individual users could use the standard System Preferences > Keyboard > Shortcuts remapping to avoid clashes with the ⌘E edit/view and ⌘G graph view shortcuts.

+1. This is a standard macOS idiom that ought to be supported!