Repository navigation
Autocomplete breaks second order ins-completion #18044
Description
Activity
Can you try with #18048 and see it there is improvement.
That pr doesn't make a difference for this as far as I can tell.
As a temporary workaround, creating mappings like this works:
inoremap <C-X><C-R> <Cmd>set noac<CR><C-X><C-R><Cmd>set ac<CR> inoremap <C-X><C-L> <Cmd>set noac<CR><C-X><C-L><Cmd>set ac<CR>Though I don't know if that helps you pinpoint the issue.
I am not sure what the correct behavior ought to be. With
:set acwhen I type^X^Lon an empty line, I see a list of lines. If I type it again, the menu gets dismissed as it should be. Without autocomplete, it opens a newline when the keys are typed again (not correct). What is your use case for^X^L?The second
<C-X><C-L>should insert the next line after the one you just completed, see this part of the docs:CTRL-X CTRL-L After expanding a line you can additionally get the line next to it by typing CTRL-X CTRL-L again, unless a double CTRL-X is used. Only works for loaded buffers.Here's an example:
Follow-up
compl-currentis also affected, and probablycompl-keywordandcompl-define.Follow-up
compl-vimcompletion behaves as it should.Reacted by girish- added 2 commits that reference this issue
on Aug 20, 2025 - added a commit that references this issue
on Aug 23, 2025 - added 3 commits that reference this issue
on Aug 23, 2025 Sorry I'm a bit late, but does patch 9.1.1670 actually fix this for you @girishji?
The example in the asciicast above still doesn't work for me with:
$ vim --clean -c 'set ac'And
$ vim --version VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jan 01 1980 00:00:00) Included patches: 1-1684 Compiled by nixbld Huge version without GUI. Features included (+) or not (-): +acl +find_in_path +multi_byte -tcl +arabic +float +multi_lang +termguicolors +autocmd +folding -mzscheme +terminal +autochdir -footer +netbeans_intg +terminfo -autoservername +fork() +num64 +termresponse -balloon_eval +gettext +packages +textobjects +balloon_eval_term -hangul_input +path_extra +textprop -browse +iconv -perl +timers ++builtin_terms +insert_expand +persistent_undo +title +byte_offset +ipv6 +popupwin -toolbar +channel +job +postscript +user_commands +cindent +jumplist +printer +vartabs +clientserver +keymap +profile +vertsplit -clipboard +lambda -python +vim9script +cmdline_compl +langmap -python3 +viminfo +cmdline_hist +libcall +quickfix +virtualedit +cmdline_info +linebreak +reltime +visual +comments +lispindent +rightleft +visualextra +conceal +listcmds -ruby +vreplace +cryptv +localmap +scrollbind -wayland +cscope -lua +signs -wayland_clipboard +cursorbind +menu +smartindent +wildignore +cursorshape +mksession +socketserver +wildmenu +dialog_con +modify_fname -sodium +windows +diff +mouse -sound +writebackup +digraphs -mouseshape +spell -X11 -dnd +mouse_dec +startuptime +xattr -ebcdic -mouse_gpm +statusline -xfontset +emacs_tags -mouse_jsbterm -sun_workshop -xim +eval +mouse_netterm +syntax -xpm +ex_extra +mouse_sgr +tabpanel -xsmp +extra_search -mouse_sysmouse +tag_binary -xterm_clipboard -farsi +mouse_urxvt -tag_old_static -xterm_save +file_in_path +mouse_xterm -tag_any_white 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: " /nix/store/768w60p51x55v2vd9r2sl9m0mkvm239f-vim-3b3b93612/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -Wl,--as-needed -o vim -lm -ltinfoReacted by girishThe PR #18068 was not merged before closing. Please wait for chrisbra to remedy this.
That fixed it, thanks.
- added a commit that references this issue
on Sep 7, 2025 - added a commit that references this issue
on Sep 27, 2025
Steps to reproduce
$ vim --clean testfileset autocompleteyy,"ayy, etc.<C-X><C-R><C-X><C-R>Whole line ins-completion also has the same issue, follow-up invocations of
<C-X><C-L>don't insert lines as expected.Expected behaviour
Pressing
<C-X><C-R>twice should give full register completion.Pressing
<C-X><C-L>repeatedly should insert follow up lines.Version of Vim
9.1.1646
Environment
Operating system: nixos unstable
Terminal: tmux 3.5a
TERM: tmux-256color
Shell: fish 4.0.2
Logs and stack traces