• Stars
    star
    110
  • Rank 316,770 (Top 7 %)
  • Language
    Python
  • Created about 6 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

" When there's no input, fruzzy can sort entries based on how similar they are to the current buffer
" For ex: if you're on /path/to/somefile.h, then on opening denite, /path/to/somefile.cpp
" would appear on the top of the list.
" Useful if you're bouncing a lot between similar files.
" To turn off this behavior, set the variable below  to 0

let g:fruzzy#sortonempty = 1 " default value

" 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'}
let g:ctrlp_match_current_file = 1 " to include current file in matches

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

Manual installation

  1. Download the module for your platform. If on mac, rename to fruzzy_mod.so

  2. place in /path/to/fruzzy/rplugin/python3

  3. Make sure you set the pref to use native module - g:fruzzy#usenative=1

  4. restart vim/nvim

Troubleshooting/Support

Raise a ticket - please include the following info:

Get the version
  1. Start vim/nvim

  2. Activate denite/ctrlp as the case may be.

  3. Execute :call fruzzy#version() - this will print one of the following

    1. version number and branch - all is good

    2. purepy - you’re using the pure python version.

    3. modnotfound - you requested the native mod with let g:fruzzy#usenative=1 but it could not be loaded

    4. outdated - native mod was loaded but it’s < v0.3. You can update the native mod from the releases.

  4. include output of the above

Describe the issue
  1. include the list of items

  2. include your query

  3. What it did vs what you expected it to do.

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

More Repositories

1

mermaid-filter

Pandoc filter for creating diagrams in mermaid syntax blocks in markdown docs
JavaScript
408
star
2

vim-ghost

Vim/Nvim client for GhostText - Edit browser text areas in Vim/Neovim
Python
328
star
3

easyblogger

Python client for Blogger platform. Write blog posts in Markdown or asciidoc and publish them on Blogger.
Python
47
star
4

TomatoKetchup

Save a copy of FreshTomato router WebUI to local disk as a backup
JavaScript
19
star
5

vuejs2-typescript-starter

VueJS2 starter with Typescript, Webpack, code-splitting, unit tests (karma) & code coverage with ASP.NET Core 2.0 server
Vue
9
star
6

hey.py

Dead simple reminder CLI tool for linux; Reminders are shown on Web and Mobile using your own Telegram bot
Python
5
star
7

powertool

Tool to wake up or suspend machines remotely by name
Python
5
star
8

zsh-arduino

zsh plugin for arduino build, upload and monitor
Shell
5
star
9

vimfiles

My vim/neovim configuration
Lua
4
star
10

eventstore-bench

Eventstore on Azure Container Services - benchmarking file storage vs local pod storage
JavaScript
4
star
11

github_commit_mailer

Python script to recieve Github.com post recieve hook and send emails with diffs
Python
3
star
12

rest-websocket-sample

Sample code for RESTful service (using Jersey) and a websocket client (Jetty/CometD)
Java
3
star
13

cxf-junit-jetty

Sample code for writing a Junit test for a restful service using CXF
Java
3
star
14

qbittorrent.py

Python client for qbittorrent REST api
Python
1
star
15

fuzzy-denite

Only for archival - see raghur/fruzzy for something that actually works well
Go
1
star
16

dotfiles

Perl
1
star
17

gitlab-cf-le-autossl

Automatically renew Gitlab Pages SSL certs using DNS challenge (Let'sEncrypt & CloudFlare). This is a mirror of
Shell
1
star
18

Eventstore.Utils

C#
1
star