How to use vim to bring search content to the search box

What I’m trying to do

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.

"global search"
exmap global_search obcommand global-search:open
nmap <Space><Space> :global_search
vmap <Space><Space> :global_search

up up

up up

Please don’t bump a thread repeatedly. That’s against our Code of Conduct.

What is the <Space><Space> supposed to do in that command? I assume you are mapping <Space> as leader. Can you show your vimrc where you map that? Because I assume if you are also unmapping <Space> to be your leader, then the second <Space> isn’t going to work. I might be wrong…

Have you seen an example, or had a working example where <Space><Space> worked?

This is an example from someone else’s vimrc. I suggest trying it with another leader key first, and isolate whether it is <Space> that is causing you trouble.

exmap global_search obcommand global-search:open
nmap <Space>sg :global_search
vmap <Space>sg :global_search
1 Like

Thank you for your answer. I’m sorry for my behavior. I will pay attention to it.

<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

1 Like

Oh I see. I wonder if there are similar commands for copying to clipboard and pasting after the focus has been changed.

1 Like

I have used JetBrains/ideavim,No additional settings are required to fulfill my demands

vnoremap <leader><space> :action GotoSymbol<CR>