Steps to reproduce
- Install vim using homebrew or build from source on macOS.
- Run
vim -Nu NONE test.txt and then :set completeopt=menu,fuzzy
- In the insert mode, type
iostream fstream strm, and then hit CTRL-P.
- Error "Pattern not found" is thrown.
The strange thing is that, the bug appears in both the Homebrew-installed version and the version built from source, but not in the macOS built-in /usr/bin/vim! The Homebrew version includes all the features of the built-in version and is more up-to-date, yet the built-in version works correctly while the others throw an error. I have no idea why this happens.
I have attempted to build Vim from source twice:
- Using
./configure --prefix=$HOME/.local
- Using
./configure --with-features=huge --enable-python3interp --prefix=$HOME/.local
Fuzzy completion fails in both cases.
Expected behaviour
A menu should pop up with two choices to select, and iostream should be in the line.
Version of Vim
9.1.1450 (the Homebrew version. See details below.)
Environment
Operating System: macOS Sequoia 15.5.
Terminal: macOS built-in Terminal.app.
$TERM: xterm-256color
Shell: zsh 5.9 (arm64-apple-darwin24.0)
Logs and stack traces
For your reference, below are the versions of the macOS built-in Vim, the Homebrew-installed version, and the source-built version:
- The macOS built-in Vim, where the fuzzy completion works fine:
/usr/bin/vim --version
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Apr 18 2025 23:20:17)
macOS version - arm64
Included patches: 1-754
Compiled by [email protected]
Normal version without 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 +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
+ex_extra +mouse_netterm +syntax -xterm_clipboard
+extra_search +mouse_sgr +tag_binary -xterm_save
-farsi -mouse_sysmouse -tag_old_static
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
3rd user vimrc file: "~/.config/vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L/usr/local/lib -o vim -lm -lncurses -liconv -framework Cocoa
- The Homebrew version, where fuzzy completion won't work:
/opt/homebrew/bin/vim --version
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jun 10 2025 18:31:44)
macOS version - arm64
Included patches: 1-1450
Compiled by Homebrew
Huge version without GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_urxvt -tag_old_static
+arabic +find_in_path +mouse_xterm -tag_any_white
+autocmd +float +multi_byte -tcl
+autochdir +folding +multi_lang +termguicolors
-autoservername -footer -mzscheme +terminal
-balloon_eval +fork() +netbeans_intg +terminfo
+balloon_eval_term +gettext +num64 +termresponse
-browse -hangul_input +packages +textobjects
++builtin_terms +iconv +path_extra +textprop
+byte_offset +insert_expand +perl +timers
+channel +ipv6 +persistent_undo +title
+cindent +job +popupwin -toolbar
-clientserver +jumplist +postscript +user_commands
+clipboard +keymap +printer +vartabs
+cmdline_compl +lambda +profile +vertsplit
+cmdline_hist +langmap -python +vim9script
+cmdline_info +libcall +python3 +viminfo
+comments +linebreak +quickfix +virtualedit
+conceal +lispindent +reltime +visual
+cryptv +listcmds +rightleft +visualextra
+cscope +localmap +ruby +vreplace
+cursorbind +lua +scrollbind +wildignore
+cursorshape +menu +signs +wildmenu
+dialog_con +mksession +smartindent +windows
+diff +modify_fname +sodium +writebackup
+digraphs +mouse +sound -X11
-dnd -mouseshape +spell -xattr
-ebcdic +mouse_dec +startuptime -xfontset
+emacs_tags -mouse_gpm +statusline -xim
+eval -mouse_jsbterm -sun_workshop -xpm
+ex_extra +mouse_netterm +syntax -xsmp
+extra_search +mouse_sgr +tabpanel -xterm_clipboard
-farsi -mouse_sysmouse +tag_binary -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
3rd user vimrc file: "~/.config/vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/opt/homebrew/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -o vim -lm -lncurses -lsodium -liconv -lintl -framework AppKit -L/opt/homebrew/opt/lua/lib -llua5.4 -fstack-protector-strong -L/System/Library/Perl/5.34/darwin-thread-multi-2level/CORE -lperl -L/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.13/lib/python3.13/config-3.13-darwin -lpython3.13 -framework CoreFoundation -lruby.3.4 -L/opt/homebrew/Cellar/ruby/3.4.4/lib
- The version built from source with
./configure --with-features=huge --enable-python3interp --prefix=$HOME/.local, which the fuzzy completion still won't work:
/Users/zhuxy/.local/bin/vim --version
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jun 19 2025 22:14:47)
macOS version - arm64
Included patches: 1-1471
Compiled by zhuxy@bogon
Huge version without GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_urxvt -tag_old_static
+arabic +find_in_path +mouse_xterm -tag_any_white
+autocmd +float +multi_byte -tcl
+autochdir +folding +multi_lang +termguicolors
-autoservername -footer -mzscheme +terminal
-balloon_eval +fork() +netbeans_intg +terminfo
+balloon_eval_term -gettext +num64 +termresponse
-browse -hangul_input +packages +textobjects
++builtin_terms +iconv +path_extra +textprop
+byte_offset +insert_expand -perl +timers
+channel +ipv6 +persistent_undo +title
+cindent +job +popupwin -toolbar
-clientserver +jumplist +postscript +user_commands
+clipboard +keymap +printer +vartabs
+cmdline_compl +lambda +profile +vertsplit
+cmdline_hist +langmap -python +vim9script
+cmdline_info +libcall +python3 +viminfo
+comments +linebreak +quickfix +virtualedit
+conceal +lispindent +reltime +visual
+cryptv +listcmds +rightleft +visualextra
-cscope +localmap -ruby +vreplace
+cursorbind -lua +scrollbind +wildignore
+cursorshape +menu +signs +wildmenu
+dialog_con +mksession +smartindent +windows
+diff +modify_fname +sodium +writebackup
+digraphs +mouse +sound -X11
-dnd -mouseshape +spell -xattr
-ebcdic +mouse_dec +startuptime -xfontset
+emacs_tags -mouse_gpm +statusline -xim
+eval -mouse_jsbterm -sun_workshop -xpm
+ex_extra +mouse_netterm +syntax -xsmp
+extra_search +mouse_sgr +tabpanel -xterm_clipboard
-farsi -mouse_sysmouse +tag_binary -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
3rd user vimrc file: "~/.config/vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/Users/zhuxy/.local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -I/opt/homebrew/Cellar/libsodium/1.0.20/include -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L/usr/local/lib -o vim -lm -lncurses -L/opt/homebrew/Cellar/libsodium/1.0.20/lib -lsodium -liconv -framework AppKit -L/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/lib/python3.12/config-3.12-darwin -lpython3.12 -framework CoreFoundation
Steps to reproduce
vim -Nu NONE test.txtand then:set completeopt=menu,fuzzyiostream fstream strm, and then hit CTRL-P.The strange thing is that, the bug appears in both the Homebrew-installed version and the version built from source, but not in the macOS built-in
/usr/bin/vim! The Homebrew version includes all the features of the built-in version and is more up-to-date, yet the built-in version works correctly while the others throw an error. I have no idea why this happens.I have attempted to build Vim from source twice:
./configure --prefix=$HOME/.local./configure --with-features=huge --enable-python3interp --prefix=$HOME/.localFuzzy completion fails in both cases.
Expected behaviour
A menu should pop up with two choices to select, and
iostreamshould be in the line.Version of Vim
9.1.1450 (the Homebrew version. See details below.)
Environment
Operating System: macOS Sequoia 15.5.
Terminal: macOS built-in Terminal.app.
$TERM: xterm-256color
Shell: zsh 5.9 (arm64-apple-darwin24.0)
Logs and stack traces
For your reference, below are the versions of the macOS built-in Vim, the Homebrew-installed version, and the source-built version:
./configure --with-features=huge --enable-python3interp --prefix=$HOME/.local, which the fuzzy completion still won't work: