the_platinum_searcher

command module
v1.6.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2014 License: MIT Imports: 10 Imported by: 0

README

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 github.com/monochromegane/the_platinum_searcher
$ cd $GOPATH/src/github.com/monochromegane/the_platinum_searcher
$ go build -o $GOBIN/pt
User

Download from following urls.

Or, you can use Homebrew (Only MacOSX).

$ brew tap monochromegane/pt
$ brew install pt

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

  • Build 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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL