GithubHelp home page GithubHelp logo

lvela / the_platinum_searcher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from monochromegane/the_platinum_searcher

0.0 1.0 0.0 1.44 MB

A code search tool similar to ack and the_silver_searcher(ag). It supports multi platforms and multi encodings.

License: MIT License

Go 100.00%

the_platinum_searcher's Introduction

The Platinum Searcher

A code search tool similar to ack and the_silver_searcher(ag). It supports multi platforms and multi encodings.

Features

  • It searches code about 3โ€“5ร— faster than ack.
  • It searches code as fast as the_silver_searcher(ag).
  • It ignores file patterns from your .gitignore and .hgignore.
  • It searches UTF-8, EUC-JP and Shift_JIS files.
  • It provides binaries for multi platform (Mac OS X, Windows, Linux).

Benchmarks

ack go  6.24s user 1.06s system 99%  cpu 7.304 total # ack:
ag go   0.88s user 1.39s system 221% cpu 1.027 total # ag:  It's faster than ack
pt go   1.09s user 1.01s system 235% cpu 0.892 total # pt:  It's faster than ag!!

Installation

Developer

$ go get -u github.com/monochromegane/the_platinum_searcher/...

User

Download from the following url.

Or, you can use Homebrew (Only MacOSX).

$ brew install pt

pt is an alias for the_platinum_searcher in Homebrew.

Usage

$ # Recursively searchs for PATTERN in current directory.
$ pt PATTERN

$ # You can specified PATH and some OPTIONS.
$ pt OPTIONS PATTERN PATH

Editor Integration

Vim + Unite.vim

You can use pt with Unite.vim.

nnoremap <silent> ,g :<C-u>Unite grep:. -buffer-name=search-buffer<CR>
if executable('pt')
  let g:unite_source_grep_command = 'pt'
  let g:unite_source_grep_default_opts = '--nogroup --nocolor'
  let g:unite_source_grep_recursive_opt = ''
  let g:unite_source_grep_encoding = 'utf-8'
endif

Emacs + pt.el

You can use pt with pt.el, which can be installed from MELPA.

Code Status

wercker status

Build Status

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

the_platinum_searcher's People

Contributors

bling avatar colinrymer avatar dchapes avatar dplarson avatar drewwells avatar drmohundro avatar gabrielmiller avatar hnakamur avatar homburg avatar ichizok avatar ikaros avatar monochromegane avatar ongaeshi avatar oov avatar shantanugoel avatar shiena avatar tnmt avatar yosssi avatar zph avatar

Watchers

 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.