raghur / fruzzy Goto Github PK
View Code? Open in Web Editor NEWFreaky fast fuzzy finder for (denite.nvim/CtrlP matcher) for vim/neovim
Freaky fast fuzzy finder for (denite.nvim/CtrlP matcher) for vim/neovim
When I use Denite with command_history source that will list vim command history and use native fruzzy matcher, it will crash. The detail bug information can be found in Shougo/denite.nvim#636.
When I use nvim -i NONE
to ignore previous command history, the problem is gone. So I think it's probably because my vim command history is too large.
Hi there,
I got a crash today using fruzzy when I quit nvim (or so I believe, I'm not 100% sure). Nothing serious but I thought I'd post the crashlog here since it might be of help in solving some bugs.
Thanks for the awesome plugin,
Greetings, Sander.
Don't have a mac. Need a way to generate OSX binaries for releases
Consider the following minimal vimrc:
set nocompatible
let $DOTVIM = expand('$HOME/.config/nvim')
set runtimepath+=$DOTVIM/bundle/repos/github.com/Shougo/denite.nvim
set runtimepath+=$DOTVIM/bundle/repos/github.com/raghur/fruzzy
filetype plugin indent on
let g:fruzzy#usenative = 0
call denite#custom#source('_', 'matchers', ['matcher/fruzzy',
\ 'matcher/ignore_globs'])
Now open vim/nvim and run :Denite command
. I get the following error:
[denite] Traceback (most recent call last):
[denite] File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/denite/__init__.py", line 29, in start
[denite] return ui.start(args[0], args[1])
[denite] File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/denite/ui/default.py", line 71, in start
[denite] self._start(context['sources_queue'][0], context)
[denite] File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/denite/ui/default.py", line 121, in _start
[denite] self.update_candidates()
[denite] File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/denite/ui/default.py", line 312, in update_candidates
[denite] self._denite.filter_candidates(self._context)):
[denite] File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/denite/denite.py", line 120, in filter_candidates
[denite] self.match_candidates(ctx, matchers)
[denite] File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/denite/denite.py", line 159, in match_candidates
[denite] context['candidates'] = self.call_matchers(ctx, matchers)
[denite] File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/denite/denite.py", line 163, in call_matchers
[denite] ctx['candidates'] = matcher.filter(ctx)
[denite] File "/home/pedro/.config/nvim/bundle/repos/github.com/Shougo/denite.nvim/rplugin/python3/denite/filter/matcher/ignore_globs.py", line 42, in filter
[denite] return [x for x in context['candidates']
[denite] File "/home/pedro/.config/nvim/bundle/repos/github.com/Shougo/denite.nvim/rplugin/python3/denite/filter/matcher/ignore_globs.py", line 43, in <listcomp>
[denite] if not search(pattern, x['action__path'][:max_width])]
[denite] KeyError: 'action__path'
[denite] Please execute :messages command.
Maybe it's something with recen updates with Denite @Shougo? Thanks
Based on the description, I suspect it should be possible to write a CtrlP matcher with this as a backend. Do you think this is possible?
See also ctrlp-py-matcher and cpsm.
Hi, if I use let g:fruzzy#usenative = 0
with Denite file_mru
candidates are correctly ordered by the last recent one opened first:
~/OneDrive/jampp/repos/macross/docs/docs/macross/win_rate.md
~/OneDrive/jampp/repos/macross-daat/daat/model.py
~/OneDrive/jampp/repos/macross-daat/docs/docs/estimator.md
~/OneDrive/jampp/repos/macross/docs/docs/macross/model.md
~/git-repos/private/dotfiles/setup-new/yay.sh
~/git-repos/private/dotfiles/vim/ftplugin/python/python_settings.vim
~/OneDrive/arch/install_notes.md
~/git-repos/work/ausa/store/requirements.txt
~/git-repos/private/dotfiles/python/requirements.txt
~/git-repos/private/dotfiles/setup-new/brew.sh
~/OneDrive/varios/todos_coding_setup.md
~/git-repos/private/dotfiles/vim/mysnippets/vim.snippets
~/git-repos/private/dotfiles/bashrc
~/git-repos/private/dotfiles/vim/vimrc_min
~/git-repos/private/dotfiles/vimrc
Denite file_mru(235/236) [/home/pedro/git-repos/private/dotfiles] 235/235
on the other hand if i use let g:fruzzy#usenative = 1
then I get:
~/Desktop/lela.md
~/Desktop/bar.sh
/etc/resolv.conf
~/Desktop/baz.sh
~/Desktop/bar.py
~/Desktop/foo.md
~/Desktop/api.py
~/Desktop/foo.sh
~/Desktop/foo.py
~/Desktop/baz.py
~/.bash_history
~/.Xauthority
~/.mongorc.js
~/.lesshst
~/.fehbg
So my question is: if fruzzy is a matching/filtering algorithm why is it also sorting candidates without any kind of filtering input? I expect it to honor the initial source sorting.
Another thing I've noticed is that when using the native version I get the following message before executing a denite source:
[denite] fruzzy_mod ver: rev: v0.3 on branch: master
Can that message be suppressed? Thanks in advance
I tried to build myself, here is the file (ziped):
platform: macOS 10.14
neovim: 0.3.1
Python: 3.7.0
Error stack:
Error detected while processing function fruzzy#install[1]..provider#python3#Call:
line 18:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/seekr/.vim/bundle/fruzzy/python3/fruzzy_installer.py", line 34, in install
print("fruzzy: downloading %s to %s" % (asset['browser_download_url'],
TypeError: 'NoneType' object is not subscriptable
Although it downloads native mod fail, it still work well for me.
Thanks for your work! Awesome matcher
from PR #7
l = ['.gitignore', 'README.adoc', 'python3/ctrlp.py',
'plugin/fruzzy.vim', 'autoload/fruzzy.vim',
'autoload/fruzzy/ctrlp.vim', 'rplugin/python3/fruzzy.py',
'rplugin/python3/qc-fast.py', 'python3/fruzzy_installer.py',
'rplugin/python3/neomru_file', 'rplugin/python3/qc-single.py',
'rplugin/python3/fruzzy_mod.nim', 'rplugin/python3/fruzzy_test.py',
'rplugin/python3/denite/filter/matcher/fruzzymatcher.py']
results = scoreMatches("fmf", l, 10, True)
Python version does not find rplugin/python3/denite/filter/matcher/fruzzymatcher.py
When doing call dein#recache_runtimepath()
, I get this error:
[dein] "C:/Users/cbrunel/AppData/Local/nvim/dein/.cache/init.vim/.dein" cannot be removed.
[dein] cmdline is "rmdir /S /Q "C:\\Users\\cbrunel\\AppData\\Local\\nvim\\dein\\.cache\\init.vim\\.dein"".
After trying to remove it with PowerShell, I saw that the file fruzzy_mod.pyd
is still in use and therefore cannot be deleted.
Is there any way to get over this issue?
The dein plugin manager removes .so files from .config/dein/.cache/init.vim/.dein/rplugin/python3/ while it doesn't do so with other plugins which install to the same directory. Do you have any idea why this might be? The dein documentation doesn't mention anything about adding the files as a requirement for a plugin.
Consider the following minimal vimrc:
set nocompatible
let $DOTVIM = expand('$HOME/.config/nvim')
set runtimepath+=$DOTVIM/bundle/repos/github.com/Shougo/denite.nvim
set runtimepath+=$DOTVIM/bundle/repos/github.com/raghur/fruzzy
filetype plugin indent on
call denite#custom#source('_', 'matchers', ['matcher/fruzzy'])
function! s:DeniteScanDir()
let narrow_dir = input('Input narrowing directory: ', '', 'file')
if narrow_dir == ''
return
endif
call denite#start([{'name': 'file/rec', 'args': [narrow_dir]}])
endfunction
nnoremap <silent> ,sd :call <SID>DeniteScanDir()<CR>
If I now type ,sd
and then use .
as narrowing dir then I get the following error:
[denite] Traceback (most recent call last):
[denite] File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/denite/__init__.py", line 29, in start
[denite] return ui.start(args[0], args[1])
[denite] File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/denite/ui/default.py", line 71, in start
[denite] self._start(context['sources_queue'][0], context)
[denite] File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/denite/ui/default.py", line 121, in _start
[denite] self.update_candidates()
[denite] File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/denite/ui/default.py", line 312, in update_candidates
[denite] self._denite.filter_candidates(self._context)):
[denite] File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/denite/denite.py", line 120, in filter_candidates
[denite] self.match_candidates(ctx, matchers)
[denite] File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/denite/denite.py", line 159, in match_candidates
[denite] context['candidates'] = self.call_matchers(ctx, matchers)
[denite] File "/home/pedro/git-repos/private/dotfiles/vim/bundle/.cache/init.vim/.dein/rplugin/python3/denite/denite.py", line 163, in call_matchers
[denite] ctx['candidates'] = matcher.filter(ctx)
[denite] File "/home/pedro/.config/nvim/bundle/repos/github.com/raghur/fruzzy/rplugin/python3/denite/filter/matcher/fruzzymatcher.py", line 55, in filter
[denite] buffer = context['bufnr']
[denite] KeyError: 'bufnr'
[denite] Please execute :messages command.
BTW: Thanks for this awesome matcher.
Still uploading?
For comparison:
They're pretty similar, aside from matcher_fruzzy
instead of matcher/fruzzy
. :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.