Giter VIP home page Giter VIP logo

sublime-search-vscode's Introduction

Sublime-like Search for Visual Studio Code / vs code

Screenshot

Commands

*searchy.search (Searchy - Search) - Pop open a dialog to ask for search term, and open the results in a nice read only document. This uses ripgrep.

Usage

By default, code will be searched across the active workspace. If you would like to search in a particular folder, right click the folder in vs code, or manually enter the path relative to the active workspace in the popup:

E.g.

resources/assets: <search for this text>

Take note of the colon ":" which seperates the folder to search and search text.

Differences from malkomalko/searchy

  • Improved Windows support
  • Support for context lines
  • Support for 'seperators' between multiple matches in file
  • Added context menu
  • Lots of other improvements

Credit

This repository has been forked from malkomalko/searchy, mad props to Robert for his great work.

sublime-search-vscode's People

Contributors

garygreen avatar malkomalko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sublime-search-vscode's Issues

Error: Permission denied on macOS

Here I am on macOS Mojave 10.14.2

I tried running it from >Searchy - Search but got a non-specific error message.

So I tried right-clicking on a folder and selecting "Searchy". After submitting my search text, a new tab opened displaying this error message:

Error: Command failed: /Users/joey/rc_files/.vscode/extensions/garreh.sublime-search-vscode-0.0.1/node_modules/vscode-ripgrep/bin/rg --case-sensitive --line-number --column --hidden --context=2 -e "Footer" /Users/joey/src/fullstack-tutorial/start/client
/bin/sh: /Users/joey/rc_files/.vscode/extensions/garreh.sublime-search-vscode-0.0.1/node_modules/vscode-ripgrep/bin/rg: Permission denied

I took a look at the file:

$ cd /Users/joey/rc_files/.vscode/extensions/garreh.sublime-search-vscode-0.0.1/node_modules/vscode-ripgrep/bin
$ file rg
rg: Mach-O 64-bit executable x86_64
$ ls -l rg
-rw-r--r-- 1 joey staff 2384144 May 22 10:50 rg

OK no wonder, it's not executable. So I made it executable with chmod a+x.

But surprisingly I still got the exact same error message when I searched again!

I restarted VSCode. Now when I search, nothing happens. No new tab, no error message.

I'm not sure where to look for debugging logs.


No biggie anyway, I just thought I'd report. I'm not desperate for this plugin. Was just curious.

"search.location": "panel" is good enough for me at the moment.

Swallowing error output

Unlike the original searchy, this code swallows the error output and nothing appears to enable me to debug its unworking state...

Linux

The binaries do not work on Linux.

Anyways, providing binaries is not the way to go. You should rely on system-provided binaries (linux packages) or download the correct ones.

Add rg.exe

For this extension to work in Windows, the file "rg.exe" should be placed here (beside "rg"):
\node_modules\vscode-ripgrep\bin\rg.exe

You can take this file from vscode's:
\resources\app\node_modules.asar.unpacked\vscode-ripgrep\bin\rg.exe

How do I search root folder of project?

Love the idea of this but can't seem to get it working.

So I press Cmd+Shift+P to open command search, choose "Searchy - Search" and a box comes up saying "search term...". I type a phrase like "foo" and nothing shows up. So then I try ": foo" and still nothing comes up. What am I missing?

Searchy fails without any error

When I run searchy.search, nothing visible happens on my screen. I did find an error in the output window (after I searched for 'bob':

[renderer1] [error] cannot open searchy:bob.searchy?cmd%3Dbob. Detail: Cannot read property '1' of null: Error: cannot open searchy:bob.searchy?cmd%3Dbob. Detail: Cannot read property '1' of null
    at n.then.e (file:///F:/dev/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4644:361)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Any thoughts on what's going on?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.