Closed saccarosium closed 8 months ago
It is not supposed to work for file completion. Not supported by Vim (see below). It just sets wildoptions
to fuzzy
. For file and directory search a better way is to not depend on Vim's completion mechanism. There are other alternatives, live fuzzyy and fzf. I am also writing a small plugin (not finished yet) that will handle this situation better (https://github.com/girishji/scope.vim)
'wildoptions' 'wop' string (default "")
global
A list of words that change how |cmdline-completion| is done.
The following values are supported:
fuzzy Use |fuzzy-matching| to find completion matches. When
this value is specified, wildcard expansion will not
be used for completion. The matches will be sorted by
the "best match" rather than alphabetically sorted.
This will find more matches than the wildcard
expansion. Currently fuzzy matching based completion
is not supported for file and directory names and
instead wildcard expansion is used.
Got it, thanks for the clarification
Hi, I've been playing around with this plugin but the
cmd.fuzzy
seems to have no effect.Current behavior
Screencast from 2024-03-05 09-08-20.webm
Expected behavior
I expect that if I want to go to my
Documents
I should be able to typents
to narrow the selection to that.Info
Configuration
```vim let s:autosuggest_options = { \ "search": { "enable": v:false }, \ "cmd": { \ "fuzzy": v:true, \ "onspace": ['e', 'b', 'find'] \ } \} autocmd VimEnter * call AutoSuggestSetup(s:autosuggest_options) ```
Vim Version
``` VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jan 11 2024 20:38:16) Included patches: 1-16 Modified by team+vim@tracker.debian.org Compiled by team+vim@tracker.debian.org Huge version with GTK3 GUI. Features included (+) or not (-): +acl +file_in_path +mouse_urxvt -tag_any_white +arabic +find_in_path +mouse_xterm +tcl +autocmd +float +multi_byte +termguicolors +autochdir +folding +multi_lang +terminal -autoservername -footer -mzscheme +terminfo +balloon_eval +fork() +netbeans_intg +termresponse +balloon_eval_term +gettext +num64 +textobjects +browse -hangul_input +packages +textprop ++builtin_terms +iconv +path_extra +timers +byte_offset +insert_expand +perl +title +channel +ipv6 +persistent_undo +toolbar +cindent +job +popupwin +user_commands +clientserver +jumplist +postscript +vartabs +clipboard +keymap +printer +vertsplit +cmdline_compl +lambda +profile +vim9script +cmdline_hist +langmap -python +viminfo +cmdline_info +libcall +python3 +virtualedit +comments +linebreak +quickfix +visual +conceal +lispindent +reltime +visualextra +cryptv +listcmds +rightleft +vreplace +cscope +localmap +ruby +wildignore +cursorbind +lua +scrollbind +wildmenu +cursorshape +menu +signs +windows +dialog_con_gui +mksession +smartindent +writebackup +diff +modify_fname +sodium +X11 +digraphs +mouse +sound +xattr +dnd +mouseshape +spell -xfontset -ebcdic +mouse_dec +startuptime +xim +emacs_tags +mouse_gpm +statusline -xpm +eval -mouse_jsbterm -sun_workshop +xsmp_interact +ex_extra +mouse_netterm +syntax +xterm_clipboard +extra_search +mouse_sgr +tag_binary -xterm_save -farsi -mouse_sysmouse -tag_old_static system vimrc file: "/etc/vim/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" system gvimrc file: "/etc/vim/gvimrc" user gvimrc file: "$HOME/.gvimrc" 2nd user gvimrc file: "~/.vim/gvimrc" defaults file: "$VIMRUNTIME/defaults.vim" system menu file: "$VIMRUNTIME/menu.vim" fall-back for $VIM: "/usr/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/webp -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -pthread -Wdate-time -g -O2 -ffile-prefix-map=/build/reproducible-path/vim-9.1.0016=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -DSYS_VIMRC_FILE=\"/etc/vim/vimrc\" -DSYS_GVIMRC_FILE=\"/etc/vim/gvimrc\" -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -Wl,-E -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lselinux -lcanberra -lsodium -lacl -lattr -lgpm -L/usr/lib -llua5.1 -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.38/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python3.11/config-3.11-x86_64-linux-gnu -lpython3.11 -ldl -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm -lruby-3.1 -lm -L/usr/lib ```