Tell HN: Vim Has Autocomplete
24 comments
Ctrl-X Ctrl-L is line based completion, see :help CTRL-X_CTRL-L for details.
:help ins-completion gets the useful docs, Vim's own docs are very good and worth spending some time learning how to use, so you can learn Vim itself better.
Another favorite of mine is 'gf' to open the filename under the cursor, very useful combined with ^X ^F.
Omni completion is also useful: https://vim.fandom.com/wiki/Omni_completion although you're better off with plugin that uses LSP now, for example https://github.com/dense-analysis/ale
:help ins-completion gets the useful docs, Vim's own docs are very good and worth spending some time learning how to use, so you can learn Vim itself better.
Another favorite of mine is 'gf' to open the filename under the cursor, very useful combined with ^X ^F.
Omni completion is also useful: https://vim.fandom.com/wiki/Omni_completion although you're better off with plugin that uses LSP now, for example https://github.com/dense-analysis/ale
Cool, thank you very much! And nice username charm. Does it work?
I thought this was going to be about Ctrl+N/Ctrl+P, which I use all the time.
I will have to discover that one too! :)
johncoltrane(2)
I had no idea what it was but it looked like an autocomplete. Initially I thought it was from the OS, or the terminal emulator. But slowly I began to form the idea that: Could it really be vim...itself?
Vainly I search for the secret command in the past. Google failed me. StackOverflow failed me. My search fu was weak I suppose....but today I am victorious.
I have discovered the secret combination. Thank you ChatGPT for enlightening me.
Crtl-X Crtl-L summons the magical menu.
There's a bunch of other combinations too:
Finally I can use this useful feature!