Skip to content
/ fruzzy Public
forked from raghur/fruzzy

Freaky fast fuzzy finder for neovim (denite.nvim matcher) for vim/neovim

Notifications You must be signed in to change notification settings

Shougo/fruzzy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Freaky fast fuzzy Denite/CtrlP matcher for vim/neovim

Installation

In your .vimrc:

" vim-plug; for other plugin managers, use what's appropriate
" if you don't want to trust a prebuilt binary, skip the 'do' part
" and build the binaries yourself. Instructions are further down
" and place them in the /path/to/plugin/rplugin/python3 folder

Plug 'raghur/fruzzy', {'do': { -> fruzzy#install()}}

" optional - but recommended - see below
let g:fruzzy#usenative = 1

" tell denite to use this matcher by default for all sources
call denite#custom#source('_', 'matchers', ['matcher/fruzzy'])

" tell CtrlP to use this matcher
let g:ctrlp_match_func = {'match': 'fruzzy#ctrlp#matcher'}

Native modules

Native module gives a 10 - 15x speedup over python - ~40-60μs!. Not that you’d notice it in usual operation (python impl is at 300 - 600μs)

  1. Run command :call fruzzy#install() if you’re not using vim-plug.

  2. restart nvim

Development

Build native module
  1. install nim >= 0.19

  2. dependencies

    1. nimble install binaryheap

    2. nimble install nimpy

  3. cd rplugin/python3

  4. [Windows] nim c --app:lib --out:fruzzy_mod.pyd -d:release -d:removelogger fruzzy_mod

  5. [Linux] nim c --app:lib --out:fruzzy_mod.so -d:release -d:removelogger fruzzy_mod

  6. -d:removelogger

    • removes all log statements from code.

    • When removelogger is not defined, only info level logs are emitted

    • Debug builds (ie: without -d:release flag) also turns on additional debug level logs

Running tests
  1. cd rplugin

  2. pytest - run tests with python implementation

  3. FUZZY_CMOD=1 pytest - run tests with native module

About

Freaky fast fuzzy finder for neovim (denite.nvim matcher) for vim/neovim

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 58.5%
  • Nim 30.1%
  • Vim Script 8.6%
  • Makefile 2.8%