GitXplorerGitXplorer
d

hmatcher

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
a3894345d38345fbe9f433cb347f74eb341bc26b

update readme with ctrl-p instructions

ddgsuarez committed 8 years ago
Unverified
b75d7285fe37a9d4e808ce8f8874c9f402cd1859

lowercase comparison

ddgsuarez committed 8 years ago
Unverified
a1f0dcda5ddccf90db6fed8787eace366b46d154

somewhat clearer function names

ddgsuarez committed 8 years ago
Unverified
056701eb4828f7deb634c9fbf44092513febb145

hlint changes

ddgsuarez committed 10 years ago
Unverified
434a05ca17904326d9748228ddccc26d2921f18d

use do notation for handling maybe

ddgsuarez committed 10 years ago
Unverified
995eb6c14e78def66541f86c629dfde25db8e0f4

better way to remove non-matches

ddgsuarez committed 11 years ago

README

The README file for this repository.

HMatcher

A simple command line fuzzy matcher, written in Haskell

Building

Just a make away

Usage with CtrlP & vim

Adapted from Burke's matcher, replace g:path_to_hmatcher with the path to the hmatcher executable:

let g:path_to_hmatcher = "/path/to/hmatcher"

if !empty(glob(g:path_to_hmatcher))
  let g:ctrlp_match_func = { 'match': 'HMatch' }
endif

function! HMatch(items, str, limit, mmode, ispath, crfile, regex)

  let cachefile = ctrlp#utils#cachedir().'/matcher.cache'
  if !( filereadable(cachefile) && a:items == readfile(cachefile) )
    call writefile(a:items, cachefile)
  endif
  if !filereadable(cachefile)
    return []
  endif

  let cmd = g:path_to_hmatcher . " " . shellescape(a:str) . " " . a:limit . " < " . cachefile

  return split(system(cmd), "\n")

endfunction