Vim Omnicomplete Awesomeness
I just discovered, through jerbear
in #python
, the omnicomplete feature in Vim 7. This is something that I’ve been idly in hope of for ages, and to discover it actually exists in Vim already is awesome (hence the title).
omnicomplete searches through any files you’ve imported (including Python library modules) and completes names you might possibly want to use:
To do this requires the rather awkward0 key combination of Ctrl-X, Ctrl-O. After much effort1, I rebound the key combination so Ctrl-Space will work as well. This requires the addition of the line “inoremap <Nul> <C-x><C-o>
” to your .vimrc
2. This doesn’t work for the graphical Vim, where you will probably want ‘C-space
’ instead of ‘Nul
’ (though I can’t be sure).
Everyone may already be aware of this, but for those who aren’t, check it out!
0 And strangely Emacs-y.
1 Thanks again to jerbear
, as well as \amethyst
and Heptite
in #vim
.
2 Or the use of the command “:inoremap <Nul> <C-x><C-o>
” when within Vim.
mats
Nice. Did not know it was that easy, I had a few problems to get it working some time ago.
Have you checked out the latest vim version? It displays a preview window where you can read the docstrings as you choose which function to call.
12 Oct 2007, 00:53
Add a comment
You are not allowed to comment on this entry as it has restricted commenting permissions.