All 1 entries tagged Vim
September 09, 2007
I just discovered, through
#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
.vimrc2. 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
2 Or the use of the command “
:inoremap <Nul> <C-x><C-o>” when within Vim.