question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Convert selection to VS Code selection for "find in project"

See original GitHub issue

First, thanks for this awesome extension, it works great.

I often like to select a range of text and then search for it. Would it be possible to make the selection turn into a real VS Code selection when I press cmd+shift+f? Any selection is auto-filled into the search input, and this would be very useful.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
vlwkaoscommented, Feb 4, 2021

under vscode conditional config

command! FindInFileS call VSCodeNotify('workbench.action.findInFiles', {'query': @p})
xnoremap <silent> <Leader>f "py<Esc>:FindInFileS<CR>

what it does is, it copies your selection to ‘p’ register then use it as a query for the find in files command.

0reactions
theol0403commented, Jun 6, 2021

When I tried this, it did not properly select characters containing non-english characters, so if you only use US keyboard this would do, but otherwise using the register is the only option working as far as I know.

I don’t know how to fix this, but I think it needs to be fixed somewhere else in this plugin, as there is ideally nothing wrong with @yogeshdhamija 's implementation (which was taken from code already used to transfer C-S-P). Unfortunately, I think a solution that does not require a register is better, even if it might not work in your case. You are welcome to keep your code in your init.vim.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Convert selection to VS Code selection for "find in project" #535
First, thanks for this awesome extension, it works great. I often like to select a range of text and then search for it....
Read more >
Basic Editing in Visual Studio Code
Learn about the basic editing features of Visual Studio Code. Search, multiple selection, code formatting.
Read more >
Find and replace text, and multi-caret selection - Visual Studio ...
The Find and Replace control appears in the upper right corner of the code editor window. It immediately highlights every occurrence of the ......
Read more >
Select all occurrences of selected word in VSCode
The find window CANNOT be open for this to work. You need to go into the text editor, highlight some phrase, and then...
Read more >
VS Code Can Do That?
You can select a whole tag in VS Code by using the balance inward and balance outward Emmet commands. It's helpful to bind...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found