Giter VIP home page Giter VIP logo

idfind's Introduction

idfind

idfind indexes a project to create a json database file. This database can then be used to search the project. When searching idfind uses the database to only look at files which can contain the search string instead of looking at all files in the project hence considerably speeding up the search. This can be used to search large projects with lots of files.

Note that idfind will not index any binary file.

Usage

  • Install rust
  • clone this repo
  • cargo build --release
  • cargo run -- --help

idfind has 4 modes of operation:

  • index: index a project to create the database file
  • cli: A cli interface for searching. It loads a db and then searches for the string entered by the user in the prompt
  • server: Spawns TCP server on port 4141 for idfind. This will load a db on the server end (loading can be slow for very large projects). A client can connect to it and send it a search string and the database path and it will return the possible files that the search string can be contined in. This is meant to be used with the search mode.
  • search: A TCP client for idfind. This will connect to the server to fetch files that can contain the search string and then search those files to print the results

The client-server mode is useful for integrating idfind with an editor. An editor plugin can just execute idfind command in search mode with a server running to do fast searchs from within the editor.

Emacs Integration

The emacs folder contains lisp file that can be used to add idfind to GNU Emacs. This is mainly copied over from GNU idutils with minor changes. To load it in emacs place the file in a folder visible to emacs for loading and add the following to your config -

(autoload 'idfind "idfind" nil t)

After that you can use M-x idfind to search for strings from within emacs. Note that it uses projectile to find the project root. If you don't have projectile you might need to edit this to add logic to find the project root or directly add the full path of the database files.

idfind's People

Contributors

vigneshsrao avatar

Watchers

 avatar  avatar

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.