some refactoring / moving around of the functions (the reason why is in the notes section below)
no bind keys by default
add some API functions: quite a big name for just 2 functions π, namely fzy#get_status_string() and fzy#get_view_string(). This is for playing nice with plugins like lightline.
add some limited ability to filter only buffer names (using the config below): it is limited because despite my efforts, I could not switch transparently between filtering buffers and filtering files. You first have to toggle a switch using <c-t> and then re-call the plugin using <c-p>. Please note that the plugins opens for buffers first. You have to toggle and re-call the plugin to filter for files. Clearly not ideal.
Config
My init.vim config for this plugin is:
nnoremap <silent> <C-p> :FuzzyOpen<cr>
let g:fuzzy_bindkeys = 1 " activate default bindkeys
let g:fuzzy_contentsearch_engine = 'ag'
Usage
<C-P> opens the plugin in buffers view
<C-T> to toggle to buffers+files view (this also kills, as <esc> does, but this is unfortunate)
<C-P> opens the plugin in buffers+files view
<C-T> to toggle back to buffers view
Notes
Some other contributors did some work, but honestly, I did not take the time to present their work here. Their commits are included in this PR, of course.
I moved around the functions because they made more sense to me. Here is my vim window with the code now (thanks to folding). I hope it is self-explanatory
Here is a terminal recording
Thanks in advance for your comments and ideas.
Best regards
Hi,
Here are several changes
Misc improvements
Please be indulgent π, I'm a Vimscript newbie!
fzy#get_status_string()
andfzy#get_view_string()
. This is for playing nice with plugins like lightline.<c-t>
and then re-call the plugin using<c-p>
. Please note that the plugins opens for buffers first. You have to toggle and re-call the plugin to filter for files. Clearly not ideal.Config
My
init.vim
config for this plugin is:Usage
Notes
Some other contributors did some work, but honestly, I did not take the time to present their work here. Their commits are included in this PR, of course.
I moved around the functions because they made more sense to me. Here is my vim window with the code now (thanks to folding). I hope it is self-explanatory
Thanks in advance for your comments and ideas. Best regards