esm7 / obsidian-vimrc-support

A plugin for the Obsidian.md note-taking software
994 stars 47 forks source link

How to bring search content to the search box #223

Open awaken233 opened 1 month ago

awaken233 commented 1 month ago

Please make sure your question is within the scope of this plugin.

Describe the question

If I select the text in the editor, I can bring the selected content to the search box, just like cmd+shift+f.

I use the obsidian-vimrc-support plugin, How can I do this?

Things I have tried

I have made the following configuration, but I can’t bring the selected content to the search box, Just open the global search box.

"global search"
exmap global_search obcommand global-search:open
nmap <Space><Space> :global_search
vmap <Space><Space> :global_search
awaken233 commented 1 month ago

<Space><Space> works normally. Pressing the shortcut key in normal mode and visual mode will jump to the search box. But my core problem is in visual mode, you can bring the selected text into the search box as a search keyword, just like you select the specified text and press cmd+shift+f.

expect: In visual mode, select the specified content, press the shortcut key, and use the selected content as a search keyword

actual: Just jump to the search box without carrying search text